From 73887703a8531461a5031451f433831e016b90c4 Mon Sep 17 00:00:00 2001 From: aminomancer <33384265+aminomancer@users.noreply.github.com> Date: Sun, 24 Jul 2022 00:06:24 -0700 Subject: [PATCH] fix os detector. adjust some downloads styles. edit a preference recommendation. --- JS/osDetector.uc.js | 6 +++--- README.md | 2 +- prefs/recommended.js | 4 ++-- resources/in-content/downloads.css | 2 ++ resources/in-content/library.css | 3 +++ 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/JS/osDetector.uc.js b/JS/osDetector.uc.js index 75747b7f..e921cc51 100644 --- a/JS/osDetector.uc.js +++ b/JS/osDetector.uc.js @@ -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 @@ -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); })(); diff --git a/README.md b/README.md index 31f605b8..b76c5130 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ I also recommend setting the following prefs in `about:config`. There are two pr | ui.systemUsesDarkTheme | Number | 1 | Enable _browser_ dark scheme | | layout.css.prefers-color-scheme.content-override | Number | 0 | Enable _content_ dark scheme | | ui.selecteditem | String | `#2F3456` | Background for selected `