From 639ba462f9385933b3ae3496525b551b9ce42c76 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 17 Nov 2024 20:34:09 +0530 Subject: Update firefox styles --- modules/firefox.home/chrome/globalKeybindings.uc.js | 17 +++++++++++++---- modules/firefox.home/chrome/userChrome.css | 7 +++++++ 2 files changed, 20 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/firefox.home/chrome/globalKeybindings.uc.js b/modules/firefox.home/chrome/globalKeybindings.uc.js index 0544bb8..204a510 100644 --- a/modules/firefox.home/chrome/globalKeybindings.uc.js +++ b/modules/firefox.home/chrome/globalKeybindings.uc.js @@ -12,8 +12,10 @@ RELEASE: [ [ctrl(shift(key('J'))), moveSelectedTabBy(+1)], [ctrl(shift(key('K'))), moveSelectedTabBy(-1)], - [ctrl(shift(key('B'))), sidetabs.toggle()], - [ctrl(alt(key('p'))), togglePassthrough(), { modes: ALL_MODES }], + [ctrl(shift(key('B'))), sidetabs.toggle], + [ctrl(alt(key('p'))), togglePassthrough, { modes: ALL_MODES }], + [alt(key('h')), history.back], + [alt(key('l')), history.forward], ], PRESS: [ // Block default key bindings @@ -22,6 +24,8 @@ [ctrl(shift(key('B'))), preventDefault()], [ctrl(key('h')), preventDefault()], [ctrl(key('b')), preventDefault()], + [alt(key('h')), preventDefault()], + [alt(key('l')), preventDefault()], [ctrl(key('j')), preventDefault(nextTab())], [ctrl(key('k')), preventDefault(prevTab())], @@ -40,7 +44,12 @@ const tabIndex = idx => () => updateTabIndex((_n, _len) => idx) const preventDefault = f => e => { e.preventDefault(); f?.(e); }; const moveSelectedTabBy = incr => () => updateSelectedTabIndex(incr); - const togglePassthrough = () => () => UC.globalKeybindings.updateMode(m => m !== MODE_PASSTHRU ? MODE_PASSTHRU : MODE_NORMAL) + const togglePassthrough = () => UC.globalKeybindings.updateMode(m => m !== MODE_PASSTHRU ? MODE_PASSTHRU : MODE_NORMAL) + + const history = { + back: () => gBrowser.goBack(), + forward: () => gBrowser.goForward(), + } const sidetabs = { // getExtensionId: () => { @@ -60,7 +69,7 @@ // } // } }, - toggle: () => async () => { + toggle: async () => { SidebarController.toggleExpanded(); // await sidetabs.ensureReady(); // const sidebar = document.getElementById('sidebar-box'); diff --git a/modules/firefox.home/chrome/userChrome.css b/modules/firefox.home/chrome/userChrome.css index 4247f33..e845194 100644 --- a/modules/firefox.home/chrome/userChrome.css +++ b/modules/firefox.home/chrome/userChrome.css @@ -117,11 +117,18 @@ toolbarbutton#alltabs-button { #urlbar { font-size: 0.95rem !important; min-height: var(--ff-urlbar-height) !important; +} +#urlbar[breakout-extend] { top: 5px !important; + width: var(--urlbar-width) !important; } #urlbar:not([breakout-extend]) { height: var(--ff-urlbar-height) !important; } +#urlbar-container { + padding-block: 0 !important; +} + #navigator-toolbox { border-bottom: none !important; } -- cgit v1.3.1