From fd1aa9d02ab43758d217bad27b60de5fa6208366 Mon Sep 17 00:00:00 2001 From: Aaron Opell Date: Tue, 5 Sep 2023 18:01:24 -0700 Subject: [PATCH 1/3] Add setting for course favicons --- js/preload.js | 22 ++++++++++++++++++++++ js/theme.js | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/js/preload.js b/js/preload.js index c98b6cd..da288c5 100644 --- a/js/preload.js +++ b/js/preload.js @@ -552,6 +552,28 @@ function updateSettings(callback) { undefined, element => element.value ).control, + new Setting( + "courseIconFavicons", + "Use Course Icons as Favicons When Possible", + "[Refresh required] Use the course's icon as the favicon (the icon next to the tab's title) on most course pages. This will not work in all cases.", + "enabled", + "select", + { + options: [ + { + text: "Enabled", + value: "enabled" + }, + { + text: "Disabled", + value: "disabled" + } + ] + }, + value => value, + undefined, + element => element.value + ).control, new Setting( "overrideUserStyles", "Override Styled Text", diff --git a/js/theme.js b/js/theme.js index 3a0e29f..1640dd0 100644 --- a/js/theme.js +++ b/js/theme.js @@ -442,7 +442,7 @@ class Theme { } img.classList.add("injected-course-icon"); - if (img == bigCourseIcon && !document.querySelector("head > link[rel='icon'][type='image/svg+xml']")) { + if (Setting.getValue("courseIconFavicons") !== "disabled" && img == bigCourseIcon && !document.querySelector("head > link[rel='icon'][type='image/svg+xml']")) { document.querySelectorAll("link[rel='shortcut icon']").forEach(el => el.remove()); let favicon = document.createElement("link"); favicon.rel = "icon"; From 288a9f83ec5bb022f5048705867402f765485526 Mon Sep 17 00:00:00 2001 From: Aaron Opell Date: Tue, 5 Sep 2023 18:01:43 -0700 Subject: [PATCH 2/3] Update some styles on drive assignments page --- css/all.css | 34 ++++++++++++++++++++++------------ css/modern/all.css | 19 +++++++++++++------ scss/modern/all.scss | 21 +++++++++++++++------ 3 files changed, 50 insertions(+), 24 deletions(-) diff --git a/css/all.css b/css/all.css index d39b951..60e18b0 100644 --- a/css/all.css +++ b/css/all.css @@ -18,36 +18,46 @@ background-color: var(--primary-color) !important; } -nav, -nav li button._1Z0RM, -nav li a._1Z0RM { +#header>header nav, +#header>headernav li button._1Z0RM, +#header>header nav li a._1Z0RM { background-color: var(--primary-color) !important; } -header { +#header>header { border-top-color: var(--border-color) !important; } -nav button._1wP6w, -nav a._1Z0RM { +#header>header nav button._1wP6w, +#header>header nav a._1Z0RM { color: var(--contrast-text-color) !important; } -nav button svg.KebabIcon-kebab-icon-2-N7X { +#header>header nav button svg.KebabIcon-kebab-icon-2-N7X { filter: Invert(1) !important; } ._2kpZl:focus:not(:active), ._2T2dA, +div.nav-breadcrumb-container-1732584003, ._2W23R:active, ._3OAXJ:hover:not(:active), -nav li button._1Z0RM:hover:not(:active), -nav li button._1Z0RM:focus:not(:active), -nav li a._1Z0RM:hover:not(:active), -nav li a._1Z0RM:focus:not(:active) { +#header>header nav li button._1Z0RM:hover:not(:active), +#header>header nav li button._1Z0RM:focus:not(:active), +#header>header nav li a._1Z0RM:hover:not(:active), +#header>header nav li a._1Z0RM:focus:not(:active) { background-color: var(--hover-color) !important; } +div.nav-breadcrumb-subContainer-4084051826::before { + display: none !important; +} + +nav.nav-breadcrumb-nav-1251684582 a, +nav.nav-breadcrumb-nav-1251684582 span { + color: var(--contrast-text-color) !important; +} + /* Borders at the top of drop down cards (Courses and Groups) */ ._2P7CY:focus, @@ -788,7 +798,7 @@ footer li a, footer div button, #copyright, footer li.Footer-vertical-divider-3-9qQ::after, -header li a, +#header>header>ul>li>a, .splus-modal-footer-text a, body a.link-btn.active, div.courses-left-menu, diff --git a/css/modern/all.css b/css/modern/all.css index 43c368b..3d858fc 100644 --- a/css/modern/all.css +++ b/css/modern/all.css @@ -258,8 +258,7 @@ variable-intellisense { color: var(--contrast-text) !important; } -:root[modern=true] footer li a, -:root[modern=true] header li a { +:root[modern=true] footer li a { color: var(--link-color) !important; } @@ -275,9 +274,9 @@ variable-intellisense { :root[modern=true] div.courses-left-menu, :root[modern=true] .portfolio-list a.btn, :root[modern=true] a._3_bfp, -:root[modern=true] nav li a.util-menu-row-link-2dTZi, -:root[modern=true] nav li a._1Z0RM, -:root[modern=true] nav li button._1Z0RM { +:root[modern=true] #header > header nav li a.util-menu-row-link-2dTZi, +:root[modern=true] #header > header nav li a._1Z0RM, +:root[modern=true] #header > header nav li button._1Z0RM { color: var(--contrast-text) !important; } @@ -521,7 +520,7 @@ variable-intellisense { background-color: var(--active); } -:root[modern=true] header div.Je0RK button._1SIMq { +:root[modern=true] #header > header div.Je0RK button._1SIMq { background-color: var(--secondary) !important; color: var(--text) !important; border-radius: var(--border-radius) !important; @@ -2424,6 +2423,14 @@ variable-intellisense { cursor: pointer; } +:root[modern=true] button.nav-tab-selected-3323184817 { + background-color: var(--background-color) !important; +} + +:root[modern=true] button.nav-tab-tab-325229968:hover { + background-color: var(--active) !important; +} + :root[modern=true] .mathquill-formula { filter: Invert(var(--theme-is-dark)) !important; } diff --git a/scss/modern/all.scss b/scss/modern/all.scss index 1d08898..b5fbfef 100644 --- a/scss/modern/all.scss +++ b/scss/modern/all.scss @@ -289,8 +289,7 @@ variable-intellisense { } } - footer li a, - header li a { + footer li a { color: var(--link-color) !important; } @@ -306,9 +305,9 @@ variable-intellisense { div.courses-left-menu, .portfolio-list a.btn, a._3_bfp, - nav li a.util-menu-row-link-2dTZi, - nav li a._1Z0RM, - nav li button._1Z0RM { + #header>header nav li a.util-menu-row-link-2dTZi, + #header>header nav li a._1Z0RM, + #header>header nav li button._1Z0RM { color: var(--contrast-text) !important; } @@ -567,7 +566,7 @@ variable-intellisense { } } - header div.Je0RK button._1SIMq { + #header>header div.Je0RK button._1SIMq { background-color: var(--secondary) !important; color: var(--text) !important; border-radius: var(--border-radius) !important; @@ -2678,6 +2677,16 @@ variable-intellisense { } } + button.nav-tab-selected-3323184817 { + background-color: var(--background-color) !important; + } + + button.nav-tab-tab-325229968 { + &:hover { + background-color: var(--active) !important; + } + } + // LaTeX Math Formulas .mathquill-formula { filter: Invert(var(--theme-is-dark)) !important; From 13443177d59fad28477001d529210f1c58cc9c52 Mon Sep 17 00:00:00 2001 From: Aaron Opell Date: Tue, 5 Sep 2023 18:02:25 -0700 Subject: [PATCH 3/3] bump version --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index a6c5db9..0ce2dd3 100644 --- a/manifest.json +++ b/manifest.json @@ -10,7 +10,7 @@ "update_url": "https://schoologypl.us/firefox_updates.json" } }, - "version": "7.8.3", + "version": "7.8.4", "icons": { "128": "imgs/icon@128.png", "64": "imgs/icon@64.png",