forked from rhinstaller/anaconda
-
Notifications
You must be signed in to change notification settings - Fork 0
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
194 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,30 @@ | ||
/* Adjust the tab, making it fit the text */ | ||
.tabbrowser-tab { | ||
-moz-window-dragging: drag; | ||
margin: auto !important; | ||
max-width: fit-content !important; | ||
} | ||
|
||
/* Adjust the tab's background to match the titlebar */ | ||
.tab-background { | ||
-moz-window-dragging: drag; | ||
background: transparent !important; | ||
box-shadow: none !important; | ||
} | ||
|
||
/* Hide a lot of things we're not going to use */ | ||
#tab-notification-deck, | ||
#PersonalToolbar, | ||
.tab-close-button, | ||
.titlebar-spacer, | ||
.titlebar-close, | ||
#alltabs-button, | ||
#statuspanel { | ||
display: none; | ||
} | ||
|
||
/* Firefox won't load pages if you outright hide the navbar, so we're tricksy */ | ||
#nav-bar { | ||
position: absolute !important; | ||
top: 100%; | ||
} |
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,44 @@ | ||
// Let us use userChrome.css | ||
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", 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", {}); | ||
|
||
// Don't use a window manager titlebar; use Firefox's built-in one | ||
user_pref("browser.tabs.inTitlebar", 1); | ||
|
||
// 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,30 @@ | ||
/* Adjust the tab, making it fit the text */ | ||
.tabbrowser-tab { | ||
-moz-window-dragging: drag; | ||
margin: auto !important; | ||
max-width: fit-content !important; | ||
} | ||
|
||
/* Adjust the tab's background to match the titlebar */ | ||
.tab-background { | ||
-moz-window-dragging: drag; | ||
background: transparent !important; | ||
box-shadow: none !important; | ||
} | ||
|
||
/* Hide a lot of things we're not going to use */ | ||
#tab-notification-deck, | ||
#PersonalToolbar, | ||
.tab-close-button, | ||
.titlebar-spacer, | ||
.titlebar-close, | ||
#alltabs-button, | ||
#statuspanel { | ||
display: none; | ||
} | ||
|
||
/* Firefox won't load pages if you outright hide the navbar, so we're tricksy */ | ||
#nav-bar { | ||
position: absolute !important; | ||
top: 100%; | ||
} |
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,44 @@ | ||
// Let us use userChrome.css | ||
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", 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", {}); | ||
|
||
// Don't use a window manager titlebar; use Firefox's built-in one | ||
user_pref("browser.tabs.inTitlebar", 1); | ||
|
||
// 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