Skip to content

Commit

Permalink
fix os detector.
Browse files Browse the repository at this point in the history
adjust some downloads styles.
edit a preference recommendation.
  • Loading branch information
aminomancer committed Jul 24, 2022
1 parent 2ff086e commit 7388770
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
6 changes: 3 additions & 3 deletions JS/osDetector.uc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @name OS Detector
// @version 1.2.0
// @version 1.3.0
// @author aminomancer
// @homepage https://github.com/aminomancer/uc.css.js
// @description Set an attribute "operatingsystem" on the root element of the
Expand All @@ -16,6 +16,6 @@
(function () {
const AppConstants =
window.AppConstants ??
ChromeUtils.import("resource://gre/modules/AppConstants.jsm")?.AppConstants;
document.documentElement.setAttribute("operatingsystem", AppConstants.platform);
window.ChromeUtils?.import("resource://gre/modules/AppConstants.jsm")?.AppConstants;
if (AppConstants) document.documentElement.setAttribute("operatingsystem", AppConstants.platform);
})();
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ I also recommend setting the following prefs in `about:config`. There are two pr
| <i>ui.systemUsesDarkTheme</i> | Number | 1 | Enable _browser_ dark scheme |
| <i>layout.css.prefers-color-scheme.content-override</i> | Number | 0 | Enable _content_ dark scheme |
| <i>ui.selecteditem</i> | String | `#2F3456` | Background for selected `<option>` elements and others |
| <i>ui.highlight</i> | String | `hsla(245, 100%, 66%, .55)` | Selection background, among others |
| <i>ui.highlight</i> | String | `hsl(250, 100%, 60%)` | Configure the system color "Highlight" |
| <i>ui.selecteditemtext</i> | String | `#FFFFFFCC` | Text color for selected `<option>` elements and others |
| ui.textHighlightBackground | String | `#7755FF` | These prefs control the appearance of text highlighted by the findbar. I choose white text on purple/pink background |
| ui.textHighlightForeground | String | `#FFFFFF` | |
Expand Down
4 changes: 2 additions & 2 deletions prefs/recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ user_pref("browser.display.windows.non_native_menus", 1);
user_pref("widget.content.allow-gtk-dark-theme", true);
// keep "all tabs" menu available at all times, useful for all tabs menu expansion pack
user_pref("browser.tabs.tabmanager.enabled", true);
// Selection background, among others
user_pref("ui.highlight", "hsla(245, 100%, 66%, .55)");
// corresponds to the system color Highlight
user_pref("ui.highlight", "hsl(250, 100%, 60%)");
// Background for selected <option> elements and others
user_pref("ui.selecteditem", "#2F3456");
// Text color for selected <option> elements and others
Expand Down
2 changes: 2 additions & 0 deletions resources/in-content/downloads.css
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@
background: var(--download-button-active-bg) !important;
}

#downloadsListBox > richlistitem.download-state.downloadHoveringButton[state="1"][exists]:hover,
#downloadsListBox > richlistitem.download-state.downloadHoveringButton:is([verdict], .openWhenFinished):hover,
richlistitem.download-state[state="1"][exists]:focus-within:not(:focus-visible),
richlistitem.download-state:is([verdict], .openWhenFinished):focus-within:not(:focus-visible) {
background: var(--download-button-focus-within-bg) !important;
Expand Down
3 changes: 3 additions & 0 deletions resources/in-content/library.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
--in-content-button-background-active: hsla(0, 20%, 90%, 0.19) !important;
--in-content-button-background-bold: hsla(0, 20%, 90%, 0.23) !important;
--in-content-border-hover: var(--dialog-box-border-hover) !important;
--arrowpanel-dimmed: color-mix(in srgb, currentColor 17%, transparent) !important;
--arrowpanel-dimmed-further: color-mix(in srgb, currentColor 25%, transparent) !important;
--arrowpanel-dimmed-even-further: color-mix(in srgb, currentColor 30%, transparent) !important;
--organizer-color: var(--plaintext-color) !important;
--organizer-deemphasized-color: color-mix(
in srgb,
Expand Down

0 comments on commit 7388770

Please sign in to comment.