From e83be32ab336ae049e964f22ad4ead090ba01cde Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 19 Jul 2024 12:09:46 -0300 Subject: Feat: manage user.js --- chrome/misc/include.css | 6 ------ chrome/misc/orig.css | 4 ---- chrome/status/panel.css | 11 ----------- chrome/tabs/hide.css | 40 --------------------------------------- chrome/tabs/tree.css | 13 ------------- chrome/tridactyl/main.css | 30 ----------------------------- chrome/userChrome.css | 6 ------ firefox-profile-sync | 3 ++- profile/chrome/misc/include.css | 6 ++++++ profile/chrome/misc/orig.css | 4 ++++ profile/chrome/status/panel.css | 11 +++++++++++ profile/chrome/tabs/hide.css | 40 +++++++++++++++++++++++++++++++++++++++ profile/chrome/tabs/tree.css | 13 +++++++++++++ profile/chrome/tridactyl/main.css | 30 +++++++++++++++++++++++++++++ profile/chrome/userChrome.css | 6 ++++++ profile/user.js | 11 +++++++++++ 16 files changed, 123 insertions(+), 111 deletions(-) delete mode 100644 chrome/misc/include.css delete mode 100644 chrome/misc/orig.css delete mode 100644 chrome/status/panel.css delete mode 100644 chrome/tabs/hide.css delete mode 100644 chrome/tabs/tree.css delete mode 100644 chrome/tridactyl/main.css delete mode 100644 chrome/userChrome.css create mode 100644 profile/chrome/misc/include.css create mode 100644 profile/chrome/misc/orig.css create mode 100644 profile/chrome/status/panel.css create mode 100644 profile/chrome/tabs/hide.css create mode 100644 profile/chrome/tabs/tree.css create mode 100644 profile/chrome/tridactyl/main.css create mode 100644 profile/chrome/userChrome.css create mode 100644 profile/user.js diff --git a/chrome/misc/include.css b/chrome/misc/include.css deleted file mode 100644 index 6bb46df..0000000 --- a/chrome/misc/include.css +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Example userChrome.css to include another one. - * - * You might also be interested in using symbolic links. - */ -@import url("../../../firefoxer/userChrome/userChrome.css"); diff --git a/chrome/misc/orig.css b/chrome/misc/orig.css deleted file mode 100644 index 90a2e64..0000000 --- a/chrome/misc/orig.css +++ /dev/null @@ -1,4 +0,0 @@ -/** - * Old original userChrome.css - */ -@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); diff --git a/chrome/status/panel.css b/chrome/status/panel.css deleted file mode 100644 index 0ef0368..0000000 --- a/chrome/status/panel.css +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Some old status panel thing. - */ - -/* -#statuspanel { - right: 0; - display: inline; -} -*/ - diff --git a/chrome/tabs/hide.css b/chrome/tabs/hide.css deleted file mode 100644 index db68534..0000000 --- a/chrome/tabs/hide.css +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Hiding the tab bar. - * - * Works best with Tree Style Tab addon: - * https://github.com/piroor/treestyletab - */ - -/** - * Hide horizontal tabs at the top of the window #1349, #1672, #2147 - * https://github.com/piroor/treestyletab/wiki/Code-snippets-for-custom-style-rules#hide-horizontal-tabs-at-the-top-of-the-window-1349-1672-2147 - */ - -/* -#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar > .toolbar-items { - opacity: 0; - pointer-events: none; -} -*/ - -/** - * Always hide the tab bar. - */ -#main-window:not([tabsintitlebar="true"]) #TabsToolbar { - visibility: collapse !important; -} - -/** - * Only hide horizontal tabs if Tree Style Tabs sidebar is visible - * Only works in Firefox if layout.css.has-selector.enabled is set to true in about:config. - * https://github.com/piroor/treestyletab/wiki/Code-snippets-for-custom-style-rules#only-hide-horizontal-tabs-if-tree-style-tabs-sidebar-is-visible - */ -/* -html#main-window body:has(#sidebar-box[sidebarcommand=treestyletab_piro_sakura_ne_jp-sidebar-action][checked=true]:not([hidden=true])) #TabsToolbar { - visibility: collapse !important; -} -*/ -/*#main-window body:has(#browser vbox[id="sidebar-box"][hidden=false]) #TabsToolbar {/* - visibility: collapse !important; -} -*/ diff --git a/chrome/tabs/tree.css b/chrome/tabs/tree.css deleted file mode 100644 index c41206a..0000000 --- a/chrome/tabs/tree.css +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Tree Style Tab customizations - * https://github.com/piroor/treestyletab/wiki/Code-snippets-for-custom-style-rules - */ - -/** - * Hide the "Tree Style Tab" header at the top of the sidebar - * https://github.com/piroor/treestyletab/wiki/Code-snippets-for-custom-style-rules#hide-the-tree-style-tab-header-at-the-top-of-the-sidebar - */ - -#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header { - display: none; -} diff --git a/chrome/tridactyl/main.css b/chrome/tridactyl/main.css deleted file mode 100644 index d636594..0000000 --- a/chrome/tridactyl/main.css +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Tridactyl customizations. - * https://github.com/tridactyl/tridactyl - */ - -:root:not([customizing]) #navigator-toolbox:not(:hover):not(:focus-within) #TabsToolbar { - visibility: collapse; -} - -statuspanel[type="overLink"], -#statuspanel[type="overLink"] { - display: none !important; -} - -#TabsToolbar { - visibility: collapse; -} - -#navigator-toolbox:not(:hover):not(:focus-within) #toolbar-menubar > * { - background-color: rgb(232, 232, 231); -} - -#main-window[sizemode="maximized"] #content-deck { - padding-top: 8px; -} - -#statuspanel { - right: 0; - display: inline; -} diff --git a/chrome/userChrome.css b/chrome/userChrome.css deleted file mode 100644 index 6ebfd6f..0000000 --- a/chrome/userChrome.css +++ /dev/null @@ -1,6 +0,0 @@ -/** - * userChrome.css for Firefoxer - */ - -@import "tabs/hide.css"; -@import "tabs/tree.css"; diff --git a/firefox-profile-sync b/firefox-profile-sync index 3b0196a..367d9dd 100755 --- a/firefox-profile-sync +++ b/firefox-profile-sync @@ -15,5 +15,6 @@ cd $PROFILES # Dispatch for profile in *; do echo "Syncing $profile..." - rsync -q -av --delete $BASEDIR/chrome/ $profile/chrome/ + rsync -q -av --delete $BASEDIR/profile/chrome/ $profile/chrome/ + cp $BASEDIR/profile/user.js $profile/user.js done diff --git a/profile/chrome/misc/include.css b/profile/chrome/misc/include.css new file mode 100644 index 0000000..6bb46df --- /dev/null +++ b/profile/chrome/misc/include.css @@ -0,0 +1,6 @@ +/** + * Example userChrome.css to include another one. + * + * You might also be interested in using symbolic links. + */ +@import url("../../../firefoxer/userChrome/userChrome.css"); diff --git a/profile/chrome/misc/orig.css b/profile/chrome/misc/orig.css new file mode 100644 index 0000000..90a2e64 --- /dev/null +++ b/profile/chrome/misc/orig.css @@ -0,0 +1,4 @@ +/** + * Old original userChrome.css + */ +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); diff --git a/profile/chrome/status/panel.css b/profile/chrome/status/panel.css new file mode 100644 index 0000000..0ef0368 --- /dev/null +++ b/profile/chrome/status/panel.css @@ -0,0 +1,11 @@ +/** + * Some old status panel thing. + */ + +/* +#statuspanel { + right: 0; + display: inline; +} +*/ + diff --git a/profile/chrome/tabs/hide.css b/profile/chrome/tabs/hide.css new file mode 100644 index 0000000..db68534 --- /dev/null +++ b/profile/chrome/tabs/hide.css @@ -0,0 +1,40 @@ +/** + * Hiding the tab bar. + * + * Works best with Tree Style Tab addon: + * https://github.com/piroor/treestyletab + */ + +/** + * Hide horizontal tabs at the top of the window #1349, #1672, #2147 + * https://github.com/piroor/treestyletab/wiki/Code-snippets-for-custom-style-rules#hide-horizontal-tabs-at-the-top-of-the-window-1349-1672-2147 + */ + +/* +#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar > .toolbar-items { + opacity: 0; + pointer-events: none; +} +*/ + +/** + * Always hide the tab bar. + */ +#main-window:not([tabsintitlebar="true"]) #TabsToolbar { + visibility: collapse !important; +} + +/** + * Only hide horizontal tabs if Tree Style Tabs sidebar is visible + * Only works in Firefox if layout.css.has-selector.enabled is set to true in about:config. + * https://github.com/piroor/treestyletab/wiki/Code-snippets-for-custom-style-rules#only-hide-horizontal-tabs-if-tree-style-tabs-sidebar-is-visible + */ +/* +html#main-window body:has(#sidebar-box[sidebarcommand=treestyletab_piro_sakura_ne_jp-sidebar-action][checked=true]:not([hidden=true])) #TabsToolbar { + visibility: collapse !important; +} +*/ +/*#main-window body:has(#browser vbox[id="sidebar-box"][hidden=false]) #TabsToolbar {/* + visibility: collapse !important; +} +*/ diff --git a/profile/chrome/tabs/tree.css b/profile/chrome/tabs/tree.css new file mode 100644 index 0000000..c41206a --- /dev/null +++ b/profile/chrome/tabs/tree.css @@ -0,0 +1,13 @@ +/** + * Tree Style Tab customizations + * https://github.com/piroor/treestyletab/wiki/Code-snippets-for-custom-style-rules + */ + +/** + * Hide the "Tree Style Tab" header at the top of the sidebar + * https://github.com/piroor/treestyletab/wiki/Code-snippets-for-custom-style-rules#hide-the-tree-style-tab-header-at-the-top-of-the-sidebar + */ + +#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header { + display: none; +} diff --git a/profile/chrome/tridactyl/main.css b/profile/chrome/tridactyl/main.css new file mode 100644 index 0000000..d636594 --- /dev/null +++ b/profile/chrome/tridactyl/main.css @@ -0,0 +1,30 @@ +/** + * Tridactyl customizations. + * https://github.com/tridactyl/tridactyl + */ + +:root:not([customizing]) #navigator-toolbox:not(:hover):not(:focus-within) #TabsToolbar { + visibility: collapse; +} + +statuspanel[type="overLink"], +#statuspanel[type="overLink"] { + display: none !important; +} + +#TabsToolbar { + visibility: collapse; +} + +#navigator-toolbox:not(:hover):not(:focus-within) #toolbar-menubar > * { + background-color: rgb(232, 232, 231); +} + +#main-window[sizemode="maximized"] #content-deck { + padding-top: 8px; +} + +#statuspanel { + right: 0; + display: inline; +} diff --git a/profile/chrome/userChrome.css b/profile/chrome/userChrome.css new file mode 100644 index 0000000..6ebfd6f --- /dev/null +++ b/profile/chrome/userChrome.css @@ -0,0 +1,6 @@ +/** + * userChrome.css for Firefoxer + */ + +@import "tabs/hide.css"; +@import "tabs/tree.css"; diff --git a/profile/user.js b/profile/user.js new file mode 100644 index 0000000..cd0301a --- /dev/null +++ b/profile/user.js @@ -0,0 +1,11 @@ +/*/ + * User.js file + * https://kb.mozillazine.org/User.js_file + * http://kb.mozillazine.org/About:config_entries + */ + +// Enable userChrome.css +user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); + +// Enable the :has selector +user_pref("layout.css.has-selector.enabled", true); -- cgit v1.2.3