Skip to content

Commit

Permalink
Merge pull request #30 from PROxZIMA/fix-toolbar-width
Browse files Browse the repository at this point in the history
Fix toolbar width
  • Loading branch information
PROxZIMA authored Nov 17, 2022
2 parents 3022a80 + c6c42da commit c320ef2
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 54 deletions.
43 changes: 10 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,47 +23,24 @@
```css
 .
├──  assets
│ ├──  context.png
│ ├──  library.png
│ ├──  navbar.gif
│ ├──  preview.png
│ └──  scrollbar.gif
│ └──  preview images
├──  css
│ ├──  findbar.css
│ ├──  floatingToolbox.css
│ ├──  icons.css
│ ├──  library.css
│ ├──  myChanges.css
│ ├──  overflowMenu.css
│ ├──  popups.css
│ ├──  icons.css
│ ├──  reddit.css
│ ├──  discordCatppuccin.css
│ ├──  responsiveNavbar.css
│ ├──  tabbar.css
│ ├──  tweaks.css
│ └──  urlbar.css
│ └──  other .css files
├──  icons
│ ├──  animation.svg
│ ├──  back.svg
│ ├──  close.svg
│ ├──  close_hover.svg
│ ├──  closew.svg
│ ├──  fox-transparent.gif
│ ├──  home.svg
│ ├──  infoico.png
│ ├──  max_hover.svg
│ ├──  max_restore.svg
│ ├──  min.svg
│ ├──  min_hover.svg
│ ├──  reload.svg
│ ├──  restore_hover.svg
│ ├──  search.svg
│ ├──  sonic.gif
│ ├──  tab-loading.png
│ ├──  tracking-disabled.svg
│ ├──  tracking-enabled.svg
│ └──  welcome-back.svg
│ └──  many icons in .svg format
├──  LICENSE
├──  programs
│ ├──  install-cfg.sh
│ ├──  install-curl.sh
│ ├──  install.sh
│ ├──  install-curl.bat
│ ├──  install.bat
│ ├──  local-settings.js
│ ├──  mozilla.cfg
│ └──  user.js
Expand Down
2 changes: 1 addition & 1 deletion css/responsiveNavbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
min-height: var(--tab-min-height) !important;
max-height: var(--tab-min-height) !important;
margin-left: var(--navbar-percent) !important;
width: var(--toolbar-percent) !important;
min-width: var(--toolbar-percent) !important;
}

/* Move navigation 68% to left and negative margin to move to top line */
Expand Down
20 changes: 10 additions & 10 deletions script/floatingToolbox.uc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
// ==/UserScript==

(function () {
var prefs = Services.prefs,
enabled;
if (prefs.prefHasUserValue('userChromeJS.floatingToolbox.enabled')) {
enabled = prefs.getBoolPref('userChromeJS.floatingToolbox.enabled')
} else {
prefs.setBoolPref('userChromeJS.floatingToolbox.enabled', false);
enabled = false;
}
// var prefs = Services.prefs,
// enabled;
// if (prefs.prefHasUserValue('userChromeJS.floatingToolbox.enabled')) {
// enabled = prefs.getBoolPref('userChromeJS.floatingToolbox.enabled')
// } else {
// prefs.setBoolPref('userChromeJS.floatingToolbox.enabled', false);
// enabled = false;
// }

var css = `
#main-window:not([customizing="true"]) #navigator-toolbox {
Expand All @@ -31,7 +31,7 @@
var sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService);
var uri = makeURI('data:text/css;charset=UTF=8,' + encodeURIComponent(css));

if (enabled) {
// if (enabled) {
sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
}
// }
})();
20 changes: 10 additions & 10 deletions script/hideScrollbar.uc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
// ==/UserScript==

(function () {
var prefs = Services.prefs,
enabled;
if (prefs.prefHasUserValue('userChromeJS.floatingScrollbar.enabled')) {
enabled = prefs.getBoolPref('userChromeJS.floatingScrollbar.enabled')
} else {
prefs.setBoolPref('userChromeJS.floatingScrollbar.enabled', true);
enabled = true;
}
// var prefs = Services.prefs,
// enabled;
// if (prefs.prefHasUserValue('userChromeJS.floatingScrollbar.enabled')) {
// enabled = prefs.getBoolPref('userChromeJS.floatingScrollbar.enabled')
// } else {
// prefs.setBoolPref('userChromeJS.floatingScrollbar.enabled', true);
// enabled = true;
// }

var css = `
link[href$="global.css"] ~ scrollbox {
Expand Down Expand Up @@ -146,7 +146,7 @@
var sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService);
var uri = makeURI('data:text/css;charset=UTF=8,' + encodeURIComponent(css));

if (enabled) {
// if (enabled) {
sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
}
// }
})();

0 comments on commit c320ef2

Please sign in to comment.