-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
webui: Add Firefox theme for use on Live media
The theme upstream is here: https://github.com/garrett/firefox-theme-frame Its main aim is to shape the Firefox window to the most suitable state on Live images: - has a header bar for window switching - has no tab/status/URL bars - has no browser controls As Firefox needs the profile folder to be writable, we need to copy the profile template to a writable directory & use that as the profile path for Firefox. We also need to make sure profile folders from previous runs (possible on Live) are cleaned up. To simplify things, we also use the same theme on non Live images for now, with the expectation that a tweaked theme will provided later.
- Loading branch information
Showing
8 changed files
with
170 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* Hide things we're not going to use when there's only 1 tab */ | ||
:has(#tabbrowser-tabs tab:only-of-type) :is(#tab-notification-deck, #PersonalToolbar, #statuspanel) { | ||
display: none; | ||
} | ||
|
||
/* When there's 1 tab, ajdust the minimum tab height */ | ||
#tabbrowser-tabs:has(tab:only-of-type) { | ||
--tab-min-height: auto; | ||
} | ||
|
||
/* Hide the tab and unfocused nav bars for 1 tab */ | ||
#tabbrowser-tabs :is(tab:only-of-type, tab:only-of-type ~ *), | ||
#tabbrowser-tabs:has(tab:only-of-type) + #alltabs-button, | ||
#titlebar:has(#tabbrowser-tabs tab:only-of-type) + #nav-bar:not(:focus-within) { | ||
visibility: collapse; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Let us use userChrome.css | ||
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); | ||
|
||
// We want to use :has() | ||
user_pref("layout.css.has-selector.enabled", true); | ||
|
||
// New windows, not tabs | ||
user_pref("browser.link.open_newwindow", 2); | ||
user_pref("browser.link.open_newwindow.restriction", 1); | ||
user_pref("browser.link.open_newwindow.override.external", 2); | ||
|
||
// Dev stuff (for easier UI adusting with ctrl+shift+alt+i) | ||
user_pref("browser.aboutConfig.showWarning", false); | ||
user_pref("devtools.chrome.enabled", true); | ||
user_pref("devtools.debugger.remote-enabled", true); | ||
user_pref("devtools.inspector.showUserAgentStyles", true); | ||
|
||
// Don't have any startup page | ||
user_pref("browser.startup.page", 0); | ||
user_pref("browser.startup.homepage", "about:blank"); | ||
user_pref("browser.startup.homepage_override.once", {}); | ||
|
||
// Use a window manager titlebar | ||
user_pref("browser.tabs.inTitlebar", 0); | ||
|
||
// Hide the bookmarks | ||
user_pref("browser.toolbars.bookmarks.visibility", "never"); | ||
|
||
// Don't show anything special in the new tab page' | ||
user_pref("browser.newtabpage.activity-stream.default.sites", ""); | ||
user_pref("browser.newtabpage.activity-stream.showSponsored", false); | ||
user_pref("browser.newtabpage.activity-stream.showSponsoredTopSites", false); | ||
|
||
// Remove UI stuff | ||
user_pref("browser.uiCustomization.state", "{\"placements\":{\"widget-overflow-fixed-list\":[],\"unified-extensions-area\":[],\"nav-bar\":[\"back-button\",\"forward-button\",\"stop-reload-button\",\"urlbar-container\",\"downloads-button\",\"unified-extensions-button\"],\"toolbar-menubar\":[\"menubar-items\"],\"TabsToolbar\":[\"tabbrowser-tabs\",\"alltabs-button\"],\"PersonalToolbar\":[\"personal-bookmarks\"]},\"seen\":[\"save-to-pocket-button\",\"developer-button\"],\"dirtyAreaCache\":[\"nav-bar\",\"TabsToolbar\",\"toolbar-menubar\",\"PersonalToolbar\"],\"currentVersion\":19,\"newElementCount\":3}"); | ||
|
||
// Don't set a placeholder for the tab before the page loads and sets title | ||
user_pref("browser.urlbar.placeholderName", ""); | ||
|
||
// Turn off calling home | ||
user_pref("app.normandy.enabled", false); | ||
user_pref("browser.discovery.enabled", false); | ||
user_pref("datareporting.healthreport.uploadEnabled", false); | ||
user_pref("datareporting.policy.dataSubmissionEnabled", false); | ||
user_pref("toolkit.telemetry.unified", false); | ||
user_pref("trailhead.firstrun.didSeeAboutWelcome", true); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* Hide things we're not going to use when there's only 1 tab */ | ||
:has(#tabbrowser-tabs tab:only-of-type) :is(#tab-notification-deck, #PersonalToolbar, #statuspanel) { | ||
display: none; | ||
} | ||
|
||
/* When there's 1 tab, ajdust the minimum tab height */ | ||
#tabbrowser-tabs:has(tab:only-of-type) { | ||
--tab-min-height: auto; | ||
} | ||
|
||
/* Hide the tab and unfocused nav bars for 1 tab */ | ||
#tabbrowser-tabs :is(tab:only-of-type, tab:only-of-type ~ *), | ||
#tabbrowser-tabs:has(tab:only-of-type) + #alltabs-button, | ||
#titlebar:has(#tabbrowser-tabs tab:only-of-type) + #nav-bar:not(:focus-within) { | ||
visibility: collapse; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Let us use userChrome.css | ||
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true); | ||
|
||
// We want to use :has() | ||
user_pref("layout.css.has-selector.enabled", true); | ||
|
||
// New windows, not tabs | ||
user_pref("browser.link.open_newwindow", 2); | ||
user_pref("browser.link.open_newwindow.restriction", 1); | ||
user_pref("browser.link.open_newwindow.override.external", 2); | ||
|
||
// Dev stuff (for easier UI adusting with ctrl+shift+alt+i) | ||
user_pref("browser.aboutConfig.showWarning", false); | ||
user_pref("devtools.chrome.enabled", true); | ||
user_pref("devtools.debugger.remote-enabled", true); | ||
user_pref("devtools.inspector.showUserAgentStyles", true); | ||
|
||
// Don't have any startup page | ||
user_pref("browser.startup.page", 0); | ||
user_pref("browser.startup.homepage", "about:blank"); | ||
user_pref("browser.startup.homepage_override.once", {}); | ||
|
||
// Use a window manager titlebar | ||
user_pref("browser.tabs.inTitlebar", 0); | ||
|
||
// Hide the bookmarks | ||
user_pref("browser.toolbars.bookmarks.visibility", "never"); | ||
|
||
// Don't show anything special in the new tab page' | ||
user_pref("browser.newtabpage.activity-stream.default.sites", ""); | ||
user_pref("browser.newtabpage.activity-stream.showSponsored", false); | ||
user_pref("browser.newtabpage.activity-stream.showSponsoredTopSites", false); | ||
|
||
// Remove UI stuff | ||
user_pref("browser.uiCustomization.state", "{\"placements\":{\"widget-overflow-fixed-list\":[],\"unified-extensions-area\":[],\"nav-bar\":[\"back-button\",\"forward-button\",\"stop-reload-button\",\"urlbar-container\",\"downloads-button\",\"unified-extensions-button\"],\"toolbar-menubar\":[\"menubar-items\"],\"TabsToolbar\":[\"tabbrowser-tabs\",\"alltabs-button\"],\"PersonalToolbar\":[\"personal-bookmarks\"]},\"seen\":[\"save-to-pocket-button\",\"developer-button\"],\"dirtyAreaCache\":[\"nav-bar\",\"TabsToolbar\",\"toolbar-menubar\",\"PersonalToolbar\"],\"currentVersion\":19,\"newElementCount\":3}"); | ||
|
||
// Don't set a placeholder for the tab before the page loads and sets title | ||
user_pref("browser.urlbar.placeholderName", ""); | ||
|
||
// Turn off calling home | ||
user_pref("app.normandy.enabled", false); | ||
user_pref("browser.discovery.enabled", false); | ||
user_pref("datareporting.healthreport.uploadEnabled", false); | ||
user_pref("datareporting.policy.dataSubmissionEnabled", false); | ||
user_pref("toolkit.telemetry.unified", false); | ||
user_pref("trailhead.firstrun.didSeeAboutWelcome", true); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters