Skip to content

Instantly share code, notes, and snippets.

@egoexpress
Last active February 26, 2024 07:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save egoexpress/eb42df3eddae5eb7bcbca61b727e9001 to your computer and use it in GitHub Desktop.
Save egoexpress/eb42df3eddae5eb7bcbca61b727e9001 to your computer and use it in GitHub Desktop.
Mozilla userChrome settings to make all extension icons show in greyscale mode
/* Copyright (c) 2017 Haggai Nuchi
Available for use under the MIT License:
https://opensource.org/licenses/MIT
*/
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
toolbarbutton#alltabs-button {
-moz-binding: url("userChrome.xml#js");
}
/* disable icons in bookmark bar */
#personal-bookmarks .bookmark-item > .toolbarbutton-icon {display:none!important}
/* greyscale icon for HTTPS icon */
#connection-icon {
filter: grayscale(100%)
}
/* greyscale icon for container icon */
#userContext-icons {
filter: grayscale(100%)
}
/* greyscale icon for (active) reader mode icon */
#reader-mode-button {
filter: grayscale(100%)
}
/* greyscale mode for _ALL_ icons!
source: https://www.reddit.com/r/firefox/comments/77iay2/firefox_beta_is_there_a_way_to_change_icons_color/ */
#navigator-toolbox toolbarbutton {
filter: grayscale(100%)
}
toolbar#PersonalToolbar .bookmark-item > .toolbarbutton-icon {
filter: grayscale(100%);
}
// Copyright (c) 2017 Haggai Nuchi
// Available for use under the MIT License:
// https://opensource.org/licenses/MIT
// Set "useLionFullScreen" in the same way that it's done in
// chrome://browser/content/browser-fullScreenAndPointerLock.js
XPCOMUtils.defineLazyGetter(FullScreen, "useLionFullScreen", function() {
return false;
});
<?xml version="1.0"?>
<!-- Copyright (c) 2017 Haggai Nuchi Available for use under the MIT License: https://opensource.org/licenses/MIT -->
-<bindings xmlns:xbl="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns="http://www.mozilla.org/xbl" id="generalBindings">
-<binding id="js" extends="chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton-badged">
-<implementation>
-<constructor>
-<![CDATA[
function makeRelativePathURI(name) {
let absolutePath = Components.stack.filename;
return absolutePath.substring(0, absolutePath.lastIndexOf("/") + 1) + name;
}
// The following code executes in the browser context,
// i.e. chrome://browser/content/browser.xul
Services.scriptloader.loadSubScript(makeRelativePathURI("userChrome.js"), window);
]]>
</constructor>
</implementation>
</binding>
</bindings>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment