Giter VIP home page Giter VIP logo

firefox-scripts's Introduction

userChromeJS

Tested on Firefox Developer Edition 111.0b4.

Instructions

Video running installation steps below: https://youtu.be/_4fdUdp3G4o

  1. Download this zip file and extract its content to Firefox installation folder (usually C:\Program Files\Mozilla Firefox). For Linux paths, read this. And this for macOS paths.

  2. Click Firefox menu button (☰) -> Help -> More troubleshooting information or simply open about:support. Find "Profile Folder", then click "Open folder". In there, create a new folder called chrome.

  3. Download one of the files below and extract its content in chrome folder.

Now, if you're only interested in extensions, you can skip to step 6.

  1. Save the desired userChromeJS scripts into chrome. Read below the description of some of them.

  2. If you want a button to manage your scripts, including the ability to disable/enable scripts without needing to restart¹ Firefox or Thunderbird, save rebuild_userChrome.uc.js into chrome.

  3. Open about:support and click "Clear startup cache…" to force Firefox to load userChromeJS on the next startup.

  4. Restart Firefox.

¹: Not all scripts are restartless. These have @shutdown at the beginning of the code. Almost all scripts on this page were written by me to be restartless, but almost all scripts you get from other sources are not.

userChromeJS scripts

ᵀᴮ: also compatible with Thunderbird

(click to expand)

BeQuiet The main purpose of this script is to control media without having to select the tab playing it. So I can play/pause a YouTube video or skip to the next song in Deezer while browsing Reddit, for example. Three hotkeys are defined by this script: Ctrl+Alt+S to play/pause, Ctrl+Alt+D to next song and Ctrl+Alt+A to previous song.

Besides that, no more than one tab should play audio at the same time. Each tab paused by another tab that starts playing is added to a stack. So if I open a new YouTube video while there's already one playing, the new tab starts playing and the other is paused. When the video ends or when I pause it, the first YouTube tab resumes playing.

As for now, I only added support for a few sites, like Deezer, Spotify and YouTube. I chose not to support next/previous in YouTube, only play/pause.

Download link.

Enter Selects Have you ever been frustrated because you wanted Firefox to autofill "https://www.youtube.com/feed/subscriptions" when you type "youtube" in location bar? That's because Firefox only autofills domains, so it will never go further than just "https://www.youtube.com/". Also because of this, Firefox will never autofill "https://www.reddit.com/r/firefox/" when you type "firefox", no matter how many times you've visited that page.

I don't like this. Firefox should be smart to always prioritize the page with higher "visit score" in browser history. That's what this script fixes. It preselects the first suggestion from address bar. For instance, if this page is the first suggestion when you type "xiaoxiaoflood", you don't need to press down arrow key before Enter.

Pages you often visit always rise to the first position, so accessing any frequent page will be as easy as typing no more than three chars + Enter, like just "you" + Enter to load YouTube Feed directly instead of YouTube homepage. It's even possible to teach Firefox to select YouTube Feed with "y" and YouTube Homepage with "yo", it's just a matter of practice.

This script replaces urlbar autocomplete, so browser.urlbar.autoFill is disabled on install. If at any time you miss domain autofill, you still sort of can achieve that by pressing Tab IF the domain of first suggestion matches what you've typed so far. Example: you typed "git" and the first suggestion is from github.com. Pressing Tab key will autocomplete the domain even if the first suggestion is not just github.com - it may be github.com/whatever. But if the typed input doesn't match the domain of the first suggestion, then Tab key will have default behavior of selecting next suggestion just like down arrow key.

Download link.

Extension Options Menu A single toolbar button to manage all your extensions. It opens a menu listing each extension. Left-click to open Options from the hovered addon, right-click to enable/disable, Ctrl + right-click to uninstall. Hover anywhere on the menu to see more.

Screenshot:

Download link.

Extensions Update Checker Firefox checks for available addon updates every 24 hours. You can disable autoinstall updates, but then you'll only know there are available updates if you manually open Add-ons Manager. This script:
  • Disables autoinstall updates for every addon.
  • Just after the daily check, if there's an addon update available it will open Add-ons Manager directly in "Available Updates" view, so that you can track changes before updating (you can click on the extension, then click "Release Notes" button).
  • You can fill ignoreList if you are deliberately using an outdated version of an extension and don't want to be notified that an update is available.

Download link.

ᵀᴮ Master Password+ Locks Firefox with password. This will prompt the password on browser startup or anytime when you lock it with Ctrl+Alt+Shift+W.

You need to set a master password in Firefox Options > Privacy & Security > [×] Use a Primary Password.

Download link.

Locked:

Unlocked:

MinMaxClose Button Toolbar button to replace native window buttons (minimize, maximize and close). I use Sidebery (vertical tabbar) with hidden titlebar, so I need this.
  • Left-click to minimize (so I can't close it accidentally).

  • Right-click to close.

  • Middleclick restores to fixed position/size (edit script code with your preferred values). If you want to restore to previous position/size, use Shift + Middleclick.

Download link.

Mouse Gestures More powerful than any mouse gestures WebExtensions. But it doesn't have user interface and I have only included actions I use, so unless the default set of actions suits you, knowledge in JavaScript is required to write extra actions. However, it's easy to change gestures for available actions. Default gestures are at the beginning of the code (search for GESTURES:). Some of them:
  • Hold right-click, then roll mouse wheel up or down to switch to next/previous tab.
  • Hold right-click, move down and release to scroll to bottom of the page (or move up to go the top). If the cursor was over an image, moving down will open a new tab for reverse image Google search instead of scrolling to bottom.
  • Hold right-click, then left-click to switch to the last selected tab.
  • Hold left-click, then right-click to reload current tab.
  • Hold right-click, then middle-click (wheel button) to close current tab.
  • Hold right-click, move left and release to copy URL of link or media under the cursor.
  • Hold right-click, move right and release to open a new tab with the link or media under the cursor.
  • Hold middle-click, move left and release to copy selected text or image under the cursor.
  • Hold middle-click, move right and release to paste.
  • Hold left-click, then press forward button (for mouse with extra buttons) to switch to next group/panel (specific compatibility with Sidebery extension).

Gestures are cumulative if possible, so holding right-click + turning mouse wheel will activate a different tab for each "tick" in the wheel.

Advantages over existing extensions:

  • Extensions can't run over Firefox interface, so gestures don't work over Firefox toolbars.
  • Extensions can't run on privileged pages like about:config and view-source.
  • Extensions need the page to start loading to run, causing gestures to fail sometimes.
  • Extensions can't set gestures for 4th and 5th mouse buttons (Back and Forward).
  • Unlike extensions that are limited by existing APIs, userChromeJS has unrestricted access to Firefox internals, so you can do almost whatever you want if you write code for that.

Download link - extract it in chrome folder.

multifoxContainer

When Firefox introduced containers, I created this script to get some features that I missed from Multifox, the legacy addon that implemented "containers" years before Firefox having this feature by default. Since then, Firefox has added some things this script had, so I removed them. But I still use it for two things:

  • New tabs (Ctrl+T or New Tab button) inherit the container of current tab (except for Private Tabs).

  • The label in urlbar serves as menubutton to reopen current tab in other container. With left click, current tab is replaced. With middleclick, a new tab opens without closing the other one.

Download link.

Open in Unloaded Tab Creates an item in contextmenu to open links/bookmarks/history in unloaded tabs, i.e. the tab is created, but it will only load when selected. Just like unloaded tabs when you start Firefox recovering tabs from previous usage. So you can, for example, open multiple related YouTube videos and load them one by one. Or open an entire bookmark folder in tabs without freezing the browser, since tab content will load on demand.

Download link.

PrivateTab Fx 77 blocked the ability to open private tabs in non-private windows, previously possible with Private Tab addon. So I decided to write this script as a replacement. You can change some minor settings at the beginning of the code.

Download link.

Redirector Requires basic JS skills to write rules using regex.

The main difference between this and extensions like Redirector it that these Firefox extensions record both pre-redirect and final URLs in history. I want it to record just the final URL.

This script can also do more complex things like running a JS function with regex results.

Finally, the main reason why I wrote this was to integrate it with Link Status Redux. When I point the mouse to a link that I've already visited, LSR displays the time of last visit. This is extremely useful for me to know if I have already visited the page and to track changes since last visit.

LSR uses Redirector rules to replace links directly in page (Redirector extension doesn't do this, it redirects only when you try to load the URL). Many URLs have gibberish at the end, I have rules to remove it, then the URL remains clean and LST can track last visit correctly (because the gibberish is different every time, generating different URLs for what is actually the same page).

Note: the list of rules in the script is just an example, mine is much bigger.

Download link.

Status Bar Brings back the good old status bar (also known as Addon Bar) at the bottom, with status text plus any buttons you want.

Screenshots:

Download link.

StyloaiX UserStyle manager to reskin Firefox window and websites. Replacement for legacy Stylish. More convenient than userChrome.css and userContent.css, as it has a powerful editor with instant preview, error checking, code autocomplete and you can enable/disable individual styles without restarting Firefox.

Screenshots (yes, I'm using the old Stylish icon):

Download link - extract it in chrome folder.

userChromeJS scripts from other authors

Some users without their own repos asked me to publish the scripts they made, what I'm currently allowing.

Auto Plain Text Links Firefox's default context menu will allow you to open plain text links if you select them first. This small addon automatically detects simple http and ftp plain text links when you right-click without needing you to select them first, then passes that URL on to the default Firefox menu items for opening them.

Download link - extract it in chrome folder.

Context to Search With this script, when you choose Search from the context menu (with text selected), instead of immediately searching it will just put the selected text in the search bar so you can edit it and choose the search engine before searching.

Download link.

Restore browser.newtab.url Pref to about:config This script restores the browser.newtab.url preference to about:config. Using this preference, you can set whatever you like as your New Tab page, including things like file:// URLs that don't work with new tab override extensions. Once you install the script, just set the preference in about:config and it should work automatically. Make sure you don't have any other new tab extensions, or it might not work.

(Written by TheRealPSV)

Download link.

Input Language Assistant this script is based on Input Language Assistant legacy extension. when you click on address bar, this script automatically changes your input language to English and once you press enter or click anywhere else, it will restore your input language to the previous language. note: this script is not restartless. if you want to enable or disable this script you need to restart browser.

(Written by siamak2)

Download link.

Restore removed pages

about:config The new about:config is way worse than the classic page. Although the new version was introduced in Fx 71, the old one was still accessible for a while via direct URL, but it was removed in Fx 87. To continue using it, save all three files from the link below, then bookmark the following URL:

chrome://userchromejs/content/aboutconfig/aboutconfig.xhtml

about:config folder

Password Manager I don't like the new password manager and the old one was removed in Fx 77. I'm still using it. If you want it too, save all three files from the link below, so that you can access the old password manager using the following URL (bookmark it):

chrome://userchromejs/content/passwordmgr/passwordManager.xhtml

Password Manager folder

Screenshots

userChromeJS Manager (the blue ones are restartless)

Status Bar, Extension Options Menu, MinMaxClose Button, newDownloadPlus.uc.js and legacy extensions:

firefox-scripts's People

Contributors

arealseal avatar garywill avatar siamak2 avatar therealpsv avatar xiaoxiaoflood avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

firefox-scripts's Issues

Project dead??

Does anyone know if this project is still active? I am able to still use script buttons with the change made in v69 to userChrome.jsm. Thanks to flandy for that. But I do miss some legacy addons like private tab and downthemall in the latest nightly. Given the code changes is it even possible to keep them working any longer?

xul files

Is it possible using xul files?
If yes, I don't know where storing them

Not working on FF69

Since the update to firefox 69 this method has stopped working. Is it possible to modify it somehow to make it work again?

eval(script.startup); made Nightly crash

@xiaoxiaoflood
Hi, looks like that in last Nightly invoking eval(script.startup); in loadScript() made crash browser. Script without @startup directive works correct. Can you confirm? Yesterday all works fine, today I got Nightly update and all stop working. They change something around eval() funciton?

styloaix not working

Fx68 here and got this error message in browser console:

styloaix.uc.js
TypeError : _uc.sss is undefined styloaix.uc.js:343

Help with user script

Hi xiaoxiaoflood,

I'm trying to convert an older legacy extension to a userscript:
https://addons.mozilla.org/en-US/firefox/addon/auto-focus-url-bar/

Source:
https://pastebin.com/bNpXZDN1

It appears that this script only works with e10s disabled and I'm not sure how to convert it to get it working with e10s. Some APIs probably need to replaced, but I'm not familiar enough with XUL to get it working:
https://developer.mozilla.org/en-US/docs/Archive/Add-ons/Add-on_SDK/Guides/XUL_Migration_Guide#Using_XPCOM

Any help would be appreciated.

status-bar.uc.js - Doesn't work anymore

Hello,

it seems, that this script doesn't work anymore. I testet it with FF v74 and v68.6 ESR (under Windows 10). There is no entry under the toolbars menu. If you have the time, could you take a look at this?

Thank you in advance. :-)

Greets

How can you edit mouseGestures_uc.js?

TL;DR: How can I edit the script to use my own gestures?

I recently installed FF DE and found about this project that allows (among other things) the use of mouse gestures that aren't limited by what web extensions can do, however, the default gestures aren't exactly what I was looking for.

Inside of the script, there's a URL (https://www.cnblogs.com/ziyunfei/archive/2011/12/15/2289504.html) that seems to be a script generator but, it's not working (I tried it with whatever the latest releases of FF DE, Vivaldi, and Waterfox Classic are; as well as FF 40 and even went back as far as 3).

I also tried editing the script itself in Notepad ++ (with 0 knowledge of JS) but whatever I edited stopped working, like this in line 157:

  'L>M': {
    name: 'Duplicate tab',
    cmd: function () {
      gBrowser.selectedTab = gBrowser.duplicateTab(gBrowser.selectedTab);
    }
  },

That I changed to this:

  'L>M': {
    name: 'Add tab',
    cmd: function () {
      gBrowser.addTab("http://www.google.com/");
    }
  },

It didn't work, that gesture stopped working but the rest of them were fine.

I also tried other scripts, like gomita's from xuldev, but they wouldn't load at all.

Cant find proper location to place config.js and config-prefs.js on Linux

I am not sure what location to put these files in on Manjaro Linux (KDE Plasma).

Everything seems to be located at /home/myusername/.mozilla/firefox/myprofile/

Your instructions state to place the config.js and config-prefs.js in the firefox installation folder (with the latter being placed within \defaults\prefs). However, aside from the path mentioned above, I am having trouble finding anything else that looks like it could be my firefox installation folder.

I also tried looking for channel-prefs.js to get a frame of reference as to my installation folder location, but could not find that either.

Please help. Thank you!

SaveFileTo and Buggy Page Info

In SaveFileTo, when you go to the Page Info and the Media tab and pick an image file, the Save As button doubles into a "Save As Save As" button. The positioning is a bit weird and the drop menu button also just brings up the Save Dialog window instead of the SaveFileTo list.

Help with script: Inject script on the web page

Hi, im trying to add this lines:

d=document;b=d.body;o=d.createElement('scri'+'pt');o.setAttribute('src','https://translate.google.cn/translate_a/element.js?cb=googleTranslateElementInit');o.setAttribute('type','text/javascript');b.appendChild(o);v=b.insertBefore(d.createElement('div'),b.firstChild);v.id='google_translate_element';v.style.display='none';p=d.createElement('scri'+'pt');p.text='function googleTranslateElementInit(){new google.translate.TranslateElement({pageLanguage:""},"google_translate_element");}';p.setAttribute('type','text/javascript');b.appendChild(p);

To a script, for run injected on the web page. But i do not know how do that... need use loadURI, but not load...

That lines inject google translate on the page (can test adding to a bookmark and pressing then the google translate appear... so, i wanna do a script (in context menu)) (Note: need add javascript:{ LINES }void 0

Appreciate your help =)

rebuild_userChrome is but button is hidden

Hi,

I clicked on an option that not remember the name(inside that extension) and now I dont have access to this button(is hidden but working, because firefox aks me for a password). How can I see aggain the button?

Add hard reload option to rebuild_userChrome.uc.js

Hi, now when we click Ctrl+Left Mouse on a given script we make reload this script (the same as turn off + turn on) but we operate with old cached script version. So every change done in our script need reload browser but it's pain always and always reload all browser (it's to heavy, especially when we have open more windows).
What if you add next option for reload, same as Ctrl+Left Mouse, but before that action you will remove all profile\startupCache content. I noticed that when I do this manually then Ctrl+Left Mouse reload script with actual change.

Add instruction to delete "startupCache" & correct folders

I just found this project - thank you for the loader, works fine on FF71.
Two suggestions:

  1. Add an instruction to delete startupCache when installing the script. Did not work for me without.

  2. Put the config-prefs.js file from the installation-folder folder to the correct subfolder, so it's easier to extract.

RSS feed reader inquiry

Hey mate,

Any ideas of converting News Fox?
It was the best known rss reader, simple and stable. Shouldn't cause troubles with adding bootstrap, only basic functions, nothing more.
All those new rss readers are pain in ass and add tons of shit to \storage\default\ (indexxdb or something)
Care to try?

https://addons.mozilla.org/en-US/firefox/addon/newsfox/
1.0.9.4.1

Thanks for your hard work, SaveFileTo/Greasemonkey/Keyconfig/Stylish/RehostImg are my beloved and used in everyday browsing.
DTA seems not to be stable :( , lots of issues, can post some if needed.

It would be really hard once they remove xbl support :(

Tab focus

Tab Focus is an old extension that works well on Waterfox Current 2020.04.
It gives focus at the Tab on which there is the mouse pointer.
It can also be installed in Firefox Developer thanks to your scripts. Unfortunately the extension doesn't work on Firefox. I'm confident that only few adaptions are needed to make it working again.
https://www.mediafire.com/file/jga4nwhq8s566v1/tab_focus-2.0.3-fx.xpi

DownThemAll and S3Download

Hi,

I'd like to show files downloaded with DownThemAll in S3Download status bar.
Are you interested in adding this feature?

[QUESTION] Any way to add a background-image to masterPasswordPlus.uc.js?

Hi,

masterPasswordPlus.uc.js includes this line:
style: 'position: fixed; display: none; width: 100%; height: 100%; top: 0; background-color: #2C50D1; z-index: 2147483647; cursor: pointer;'

I'm referring to this line because it seems to me it's there or nowhere else that I could add a background-image. Problem is I tried to but unsuccessfully.
background-color of course is easy, but i'd like to add a background-image because a simple little password input in the middle of a 23"" screen is aesthetically odd!

Thanks! Your userChromeJS scripts are fantastic.

status-bar.uc.js - missing show/hide

Hello, In new FX this was removed:
https://bugzilla.mozilla.org/show_bug.cgi?id=1430009
https://bugzilla.mozilla.org/show_bug.cgi?id=1428938

So now this not work: statusbar.setAttribute('toolboxid', 'navigator-toolbox'); and also win.gNavToolbox.externalToolbars. Description for that attrs:
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/toolbar#a-toolbarname
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/toolbox#p-externalToolbars

Is there any easy way to restore that option? I mean show/hide our new toolbar in standard context menu (#toolbar-context-menu)? I see this context is made dynamically, and use global onViewToolbarsPopupShowing(). This method use gNavToolbox.querySelectorAll("toolbar"); but our toolbar not exist any more for navigator-toolbox. When I manually add menuitem to toolbar-context-menu it was removed when we open that popup (because invoking onViewToolbarsPopupShowing works like that).

It would be nice to find some internal solution which would apply also to Menu Bar (View) or customization pallet (in this places we can make show/hide for our toolbars).

Greasemonkey

Hey mate, thanks for your great work, however with gresemonkey extension YouTube doesn't work (no video is being played):

  1. neither directly at youtube:
    https://www.youtube.com/watch?v=PmZjaYdS3fA&gl=US

Error: Could not establish connection. Receiving end does not exist. background.js:127:2
uncaught exception: g.Ld@https://www.youtube.com/yts/jsbin/player-vflbOM9Vw/en_US/base.js:216:25
rI@https://www.youtube.com/yts/jsbin/player-vflbOM9Vw/en_US/base.js:2431:64
NM@https://www.youtube.com/yts/jsbin/player-vflbOM9Vw/en_US/base.js:2717:119
w_@https://www.youtube.com/yts/jsbin/player-vflbOM9Vw/en_US/base.js:4285:89
@https://www.youtube.com/yts/jsbin/player-vflbOM9Vw/en_US/base.js:7687:161
ytplayer.load@https://www.youtube.com/watch?v=PmZjaYdS3fA&gl=US:191:56537
@https://www.youtube.com/watch?v=PmZjaYdS3fA&gl=US:191:56698
@https://www.youtube.com/watch?v=PmZjaYdS3fA&gl=US:191:56630
Error: Permission denied to access object spf.js:39:25
TypeError: window.spf is undefined base.js:893:92
ReferenceError: spf is not defined watch:1453:1

  1. nor with embedded youtube videos:
    http://forum.notebookreview.com/threads/what-song-are-you-listening-to-right-now-v4-0-no-autoplay-please.724641/page-631

Error: Could not establish connection. Receiving end does not exist. background.js:127:2
uncaught exception: g.Ld@https://www.youtube.com/yts/jsbin/player-vflbOM9Vw/en_US/base.js:216:25
rI@https://www.youtube.com/yts/jsbin/player-vflbOM9Vw/en_US/base.js:2431:64
NM@https://www.youtube.com/yts/jsbin/player-vflbOM9Vw/en_US/base.js:2717:119
w_@https://www.youtube.com/yts/jsbin/player-vflbOM9Vw/en_US/base.js:4285:89
@https://www.youtube.com/yts/jsbin/player-vflbOM9Vw/en_US/base.js:7687:161
ytplayer.load@https://www.youtube.com/watch?v=PmZjaYdS3fA&gl=US:191:55815
@https://www.youtube.com/watch?v=PmZjaYdS3fA&gl=US:191:55976
@https://www.youtube.com/watch?v=PmZjaYdS3fA&gl=US:191:55908
Error: Permission denied to access object spf.js:39:25
xb< https://www.youtube.com/yts/jsbin/spf-vflhSOzLf/spf.js:39:25
https://www.youtube.com/yts/jsbin/spf-vflhSOzLf/spf.js:39:8
https://www.youtube.com/yts/jsbin/spf-vflhSOzLf/spf.js:1:2
TypeError: window.spf is undefined base.js:893:92
uk.prototype.enable https://www.youtube.com/yts/jsbin/www-en_US-vfl3Mzk7b/base.js:893:92
g.Yh https://www.youtube.com/yts/jsbin/www-en_US-vfl3Mzk7b/base.js:446:1
https://www.youtube.com/yts/jsbin/www-en_US-vfl3Mzk7b/base.js:902:1
https://www.youtube.com/yts/jsbin/www-en_US-vfl3Mzk7b/base.js:1:17
ReferenceError: spf is not defined watch:1453:1
https://www.youtube.com/watch:1453:1

  1. Same for Chrome Store, just doesnt load at all:

Error: Could not establish connection. Receiving end does not exist.
background.js:127:2
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src”). Source: {
.... jinjaccalgkegednnccohejagnlnfdag:1
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src”). Source: Da.... jinjaccalgkegednnccohejagnlnfdag:1
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src”). Source:
.... jinjaccalgkegednnccohejagnlnfdag:1
TypeError: document.head is null inject.js:70:1
Error: Could not establish connection. Receiving end does not exist. background.js:127:2
Error: Could not establish connection. Receiving end does not exist.
background.js:127:2
CSI/start m=consumer:128:127
CSI/start m=consumer line 472 > eval:1:127
Error: Permission denied to access object
Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src”). Source: (f.... jinjaccalgkegednnccohejagnlnfdag:1
Error: Permission denied to access object

Any ideas how to get it working? I guess its breaking some CSP rules..
Legacy Greasemonkey is great for some special scripts tho

Corrupt addon?

I tried to install keyconfig.xpi, but I get a message that it's corrupt.

  1. Change two about:config options as described, extensions.legacy.enabled true and xpinstall.signatures.required false
  2. Install bootstrapLoader.xpi into Nightly 72.0.2 by downloading and dragging the file onto a browser window
  3. Restart the browser
  4. Download and try to install keyconfig.xpi or other .xpi file from this repository by dragging onto a browser window

Result: "This addon could not be installed, because it appears to be corrupt."

Greasemonkey dead + Future of addons in FF65?

Hi there again

As of today's release (ff64) greasemonkey died :((

1544536957329 addons.manager ERROR Exception calling provider .getAddonByID: ReferenceError: service is not defined(chrome://greasemonkey-modules/content/util/getService.js:6:3) JS Stack trace: [email protected]:6:3
[email protected]:79:17
[email protected]:41:12
[email protected]:226:12
asyncgetAddonByID/promises<@AddonManager.jsm:2163:12
[email protected]:2162:20
[email protected]:3280:12
@service.js:114:17
async
@service.js:113:2
@getService.js:3:1
[email protected]:59:3
[email protected]:219:7
[email protected]:182:9
[email protected]:41:5
[email protected]:257:11

1544536957331 addons.manager ERROR Exception calling provider .getAddonByID: ReferenceError: service is not defined(chrome://greasemonkey-modules/content/util/getService.js:6:3) JS Stack trace: [email protected]:6:3
[email protected]:79:17
[email protected]:41:12
[email protected]:226:12
asyncgetAddonByID/promises<@AddonManager.jsm:2163:12
[email protected]:2162:20
[email protected]:3280:12
Config.prototype._updateVersion/<@config.js:310:19
async
[email protected]:309:4
[email protected]:29:3
@service.js:30:5
[email protected]:36:7
[email protected]:48:14
@service.js:120:1
@getService.js:3:1
[email protected]:59:3
[email protected]:219:7
[email protected]:182:9
[email protected]:41:5
[email protected]:257:11

Can you get it back to life? It's usage on CSP enabled sites is crucial for me :(

Another question is that in Nightly ff65 all listed here addons are non functional..
I guess bootstrapped extensions as they were are dead, will need to convert to webextension experiments.

In case you will take a look at it, check out CB converted to webextension experiment, maintained by Infocatcher:
https://anonfile.com/Y5v7qandb4/custom_buttons-0.0.7.0.0.1-fx_xpi

Passwordmanager

Hello,
thanks a lot for bringing back the old password manager. I was directed here by another user.

I'm not using anything else from your Repo, so my question is what are the necessary steps to bring the password manger back?
I added the files to the Chrome folder and added the css files either to UserChrome.css and UserContent.css as I wasn't sure were to put it. However it still shows site doesn't exist when I open chrome://userchromejs/content/passwordmgr/passwordManager.xhtml

Request: Script to clear the search bar after the search

Hello,

first thank you very much for your work with the scripts. I use 5-6 of them already. :-)

Could you write a script which clears the search bar after the search (pressing ENTER)? Until FF v77 I used the old script Clear Search Word by ardiman with your userChrome.js method. Sadly it stopped working with FF v78.

Any chance that you could provide a similar script for FF v78 and above?

Thank you very much in advance.

Allow hooking into devtools

Would occasionally be useful; in particular, I want to try to add a "copy as httpie" in addition to the "copy as curl". There are a few other minor ideas I've been toying with too, but have no way to implement.

I have no idea how to go about this though — the page inspector (F12) is just an iframe, but I have no idea about the browser inspector (C-S-I).

FF 73 seems fine without general.config.sandbox_enabled set to false

Hi, just a FYI: firefox 73.0b3 loads custom user scripts just fine without

pref("general.config.sandbox_enabled", false);

I haven't found an official URL on Mozilla/MDN (yet) that documents this change, but it works nonetheless. Might give users a more relaxed feeling knowing that nothing relating to the FF sandbox needs to be disabled...

can not open new links after installing ublock, bootstrap

after installing ublock, bootstrap,restart the browser,then cannt open any link which is never visited, there r errors in console
源映射错误:TypeError: NetworkError when attempting to fetch resource.
源 URL:resource://activity-stream/data/content/activity-stream.bundle.js
源映射 URL:activity-stream.bundle.js.map

rebuild_userchromejs is broken

According to console, this is the error:
NotFoundError: Node.insertBefore: Child to insert before is not a child of this node rebuild_userChrome.uc.js:277:70 onBuild file:///home/spud/.mozilla/firefox/zz9xfriy.dev-edition-default/chrome/rebuild_userChrome.uc.js?1595178026000:277 aEventName resource:///modules/CustomizableUI.jsm:2869 buildWidget resource:///modules/CustomizableUI.jsm:1691 getWidgetNode resource:///modules/CustomizableUI.jsm:1166 buildArea resource:///modules/CustomizableUI.jsm:976 registerToolbarNode resource:///modules/CustomizableUI.jsm:890 registerToolbarNode resource:///modules/CustomizableUI.jsm:3606 onDOMContentLoaded chrome://browser/content/browser.js:1792 onDOMContentLoaded self-hosted:935
EDIT: I have a new error code I just discovered. Here it is: TypeError: can't access property "hidden", doc.getElementById(...) is null

Include MacOS-specific steps in README.md

Hi, just wanted to start by saying thanks for all the work on maintiaining this great resource.

I got things setup on my machine (FF v78, MacOS 10.15) and just wanted to save a little time for others who run MacOS and want to do the same but have trouble due to the FF application folder structure is a little different:

The two files found in the "fx-folder.zip" folder (config.js and config-prefs.js) should go in the following directories:

  1. /Applications/Firefox.app/Contents/Resources/config.js
  2. /Applications/Firefox.app/Contents/Resources/defaults/pref/config-prefs.js

*Note: both of the sub-directories in number 2. (defaults and pref) should already exist. but if for some reason they don't, simply create them

Black theme

Hi,

I use your scripts and I'm very satisfied.
I have a minor issue and I'm embarrassed to ask your help, but I hope you can help me.
Yesterday I was editing a script opened from your icon contextual menu in Firefox and I don't know how the notepad switched to a black theme. (Here a picture https://imgur.com/EC9YOCZ)
I don't like it and I don't know how reverting this change

How can I make iframe create with bootstrap extension load dtds properly?

Could I elevate the privilege of an iframe so it can load dtds to its src?
Just like this function did with the XMLHttpRequest()?

  fetchOverlay(srcUrl) {
    if (!srcUrl.startsWith("chrome://") && !srcUrl.startsWith("resource://")) {
      throw new Error(
        "May only load overlays from chrome:// or resource:// uris"
      );
    }

    let xhr = new this.window.XMLHttpRequest();
    xhr.overrideMimeType("application/xml");
    xhr.open("GET", srcUrl, false);

    // Elevate the request, so DTDs will work. Should not be a security issue since we
    // only load chrome, resource and file URLs, and that is our privileged chrome package.
    try {
      xhr.channel.owner = Services.scriptSecurityManager.getSystemPrincipal();
    } catch (ex) {
      oconsole.error(
        "Failed to set system principal while fetching overlay " + srcUrl
      );
      xhr.close();
      throw new Error("Failed to set system principal");
    }

    xhr.send(null);
    return xhr;
  }

Waterfox Current support?

Could you give some support to Waterfox Current that natively supports this format of legacy add-ons? It's based on Fx 68 though, so there might be so incomability with Fx 75.

I already use Stylish and DownThemAll from you. Though the newest version of DTA for Fx75 doesn't work here I use version 3.1.2.68.2019.07.01-xiao. Though it doesn't have a progressbar for downloaded files. I don't if that suppose to be or there is a more compatible version that would display progressbar while downloading?

Besides that would be possible for you to rewrite some other important add-ons? The one most important for me is TabMixPlus, but also FlashGot and Custom Buttons. I've already requested developers of those add-ons to rewrite them, but in case they wouldn't agree, could you do it? Please consider my request.

Suggestion for a new userscript

Hi,

I'm running flawlessly your masterPasswordPlus.uc.js script / Firefox 79.0. Brilliant.

In the case you'd have spare time, wondering "what could I possibly do today?" (lol) I'd bring to your attention what may be appreciated by several of us : a cousin script to masterPasswordPlus.uc.js

More seriously, the idea is that of a script which would bring a toolbar button with the only purpose of toggling the activation of the Master Password.

masterPasswordPlus.uc.js handles the activation/deactivation of the Master Password, the code is there to apply it to my suggestion.

The pertinence of a Master Password toggle script? The ability to carry on a browser session with the Master Password deactivated. I may wish to run Firefox without the Master Password (i.e. friends, relatives around), activate/deactivate it accordingly. At this time, lock is performed via your script with Ctrl+Alt+Shift+W (but that blocks as well the use of the browser given it's the very purpose of the script), or with Firefox's Clear All History (ctrl+shift+del) > Active Logins checked . I think a toggle would be pertinent that would allow to carry on a session with the Master password locked and unlock it with a click on a toolbar button (as available on Password Managers' extensions such as Bitwarden).

Even more seriously, I'm sure you have no time to spare, even less to lose. This is a plain suggestion, an idea, not even a concept!

Thanks for your scripts, all of 'em, and the very userChromeJS protocol installer which allows them all.

Mouse Gestures Scroll To Top

Hello, first of all I'd like to thank you for sharing your work. As I can see you have scroll to top action bound in gestures script but I can't get it to work any way, most likely it should replicate scroll to bottom (sending keystroke), but I can't figure out what would be the code for Home button (obviously changing 23 to 24 in that number doesn't work). Do you have any reference how to find these codes?

How to remove/deactivate windows control buttons (min, max, close)

Hi @xiaoxiaoflood,

I'm still using your hideTitlebar.uc.js script together with Tree Style Tab addon. It is super-convinient when I need to toggle a tab-bar - no need to use .css or restart a browser. However I have one issue. When the tab-bar is hidden, windows control buttons are still present. What worse, they are active despite being covered by other buttons. So e.g. you can accidentality close the browser when you just want to open the sidebar. Is there any way to get rid off them permanently or at least to deactivate them?

obraz

obraz

Little problem with homepageURL in rebuild userchrome

Hi, with press CTRL+MID the script is enable/disabled and opened the home page, so:

in line 82

    this.toggleScript(script);
    event.target.setAttribute('checked', script.isEnabled);

Need "else"

    else {
      this.toggleScript(script);
      event.target.setAttribute('checked', script.isEnabled);
    }

Access the window object

I want to develop a button that creates a new page and inserts code into it. From javascript it is something simple:

	var win = window.open('','','');
	var doc = win.document;
	doc.open();
	doc.write("hello world!");
	doc.close();
	doc.title = 'speedDial';

but if I use CustomizableUI.createWidget, I don't know how to access the new window element:

	var tab = gBrowser.addTab("about:blank", {triggeringPrincipal: Services.scriptSecurityManager.createNullPrincipal({})});
	tab.linkedBrowser.contentWindow // this is null

Do you know how to access it?

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.