From a79d991bdda2b82ce41f680652d86c993f25a1f2 Mon Sep 17 00:00:00 2001 From: Aaron Opell Date: Fri, 13 Oct 2023 15:59:34 -0700 Subject: [PATCH 1/3] Fixed coloring in some dropdown menus --- css/all.css | 8 ++++++-- css/modern/all.css | 8 ++++---- js/all.js | 4 ++-- scss/modern/all.scss | 2 +- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/css/all.css b/css/all.css index fb042709..ad53d0be 100644 --- a/css/all.css +++ b/css/all.css @@ -18,6 +18,7 @@ background-color: var(--primary-color) !important; } +#header>header, #header>header nav, #header>header nav li button._1Z0RM, #header>header nav li a._1Z0RM { @@ -72,14 +73,17 @@ nav.nav-breadcrumb-nav-1251684582 span { /* Kept old classes to remain compatible with older versions of Schoology */ .StandardHeader-header-drop-menu-YShpU, -.Header-header-drop-menu-3SaYV { +.Header-header-drop-menu-3SaYV, +.HeaderDropMenu-menu-border-3vo5S { background-color: var(--hover-color) !important; } a.StandardHeader-header-drop-menu-YShpU:hover, .StandardHeader-header-drop-menu-YShpU li a:hover, a.Header-header-drop-menu-3SaYV:hover, -.Header-header-drop-menu-3SaYV li a:hover { +.Header-header-drop-menu-3SaYV li a:hover, +a.HeaderDropMenu-menu-border-3vo5S:hover, +.HeaderDropMenu-menu-border-3vo5S li a:hover { background-color: var(--background-color) !important; } diff --git a/css/modern/all.css b/css/modern/all.css index 3d858fc0..f24d4eaf 100644 --- a/css/modern/all.css +++ b/css/modern/all.css @@ -774,19 +774,19 @@ variable-intellisense { background-color: var(--active) !important; } -:root[modern=true] div.les2- { +:root[modern=true] div.les2-, :root[modern=true] #header > header ul.util-width-thirty-nine-1B-gb { background-color: var(--secondary) !important; } -:root[modern=true] div.les2- ._3skcp { +:root[modern=true] div.les2- ._3skcp, :root[modern=true] #header > header ul.util-width-thirty-nine-1B-gb ._3skcp { border-color: var(--contrast-border) !important; } -:root[modern=true] div.les2- ._1wP6w { +:root[modern=true] div.les2- ._1wP6w, :root[modern=true] #header > header ul.util-width-thirty-nine-1B-gb ._1wP6w { color: var(--text) !important; } -:root[modern=true] div.les2- ._2wOCj { +:root[modern=true] div.les2- ._2wOCj, :root[modern=true] #header > header ul.util-width-thirty-nine-1B-gb ._2wOCj { color: var(--muted-text) !important; } diff --git a/js/all.js b/js/all.js index 1fe59f0c..80aa685a 100644 --- a/js/all.js +++ b/js/all.js @@ -914,7 +914,7 @@ let siteNavigationTileHelpers = { } }); - for (let candidateLabel of document.querySelectorAll("#header nav ul > li span._1D8fw")) { + for (let candidateLabel of document.querySelectorAll("#header nav ul > li button > span")) { if (candidateLabel.textContent == "Courses") { // a span inside a button inside a div (inside a li) coursesDropdownContainer = candidateLabel.parentElement.parentElement; @@ -979,7 +979,7 @@ let siteNavigationTileHelpers = { } }); - for (let candidateLabel of document.querySelectorAll("#header nav ul > li span._1D8fw")) { + for (let candidateLabel of document.querySelectorAll("#header nav ul > li button > span")) { if (candidateLabel.textContent == "Groups") { // a span inside a button inside a div (inside a li) groupsDropdownContainer = candidateLabel.parentElement.parentElement; diff --git a/scss/modern/all.scss b/scss/modern/all.scss index b5fbfefb..7002f18f 100644 --- a/scss/modern/all.scss +++ b/scss/modern/all.scss @@ -827,7 +827,7 @@ variable-intellisense { // Navbar menus - div.les2- { + div.les2-, #header > header ul.util-width-thirty-nine-1B-gb { background-color: var(--secondary) !important; ._3skcp { From 61ea304840816658ed327cede6a47e96d874f268 Mon Sep 17 00:00:00 2001 From: Aaron Opell Date: Fri, 13 Oct 2023 16:08:06 -0700 Subject: [PATCH 2/3] Improve icon appearance with new navbar --- css/modern/all.css | 4 ++++ scss/modern/all.scss | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/css/modern/all.css b/css/modern/all.css index f24d4eaf..c8e1dd48 100644 --- a/css/modern/all.css +++ b/css/modern/all.css @@ -344,6 +344,10 @@ variable-intellisense { background-color: var(--muted-text) !important; } +:root[modern=true][dark=true] #header > header li svg.util-v2-icon-height-2N1T4 { + filter: Hue-Rotate(200deg) Invert(1) Saturate(2); +} + :root[modern=true] .popups-box .popups-body, :root[modern=true] #popups-loading div { background-color: var(--primary) !important; diff --git a/scss/modern/all.scss b/scss/modern/all.scss index 7002f18f..6cb7473e 100644 --- a/scss/modern/all.scss +++ b/scss/modern/all.scss @@ -379,6 +379,10 @@ variable-intellisense { } } + &[dark=true] #header > header li svg.util-v2-icon-height-2N1T4 { + filter: Hue-Rotate(200deg) Invert(1) Saturate(2); + } + // Schoology Popups .popups-box .popups-body, From 9c1fef62f66048913657fbac6b4a511315f664f6 Mon Sep 17 00:00:00 2001 From: Aaron Opell Date: Sun, 15 Oct 2023 20:14:34 -0700 Subject: [PATCH 3/3] bump version, add survey message --- js/version-specific.js | 34 ++++++++++++++++++++++++++++++++-- manifest.json | 2 +- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/js/version-specific.js b/js/version-specific.js index c5d5c5f5..f90c61c2 100644 --- a/js/version-specific.js +++ b/js/version-specific.js @@ -123,8 +123,8 @@ function saveBroadcasts(broadcasts, callback = undefined) { * @param {Date|number} timestamp Timestamp to show as the post time in the home feed * @returns {Broadcast} */ -function createBroadcast(id, title, message, timestamp = Date.now()) { - return { id: String(id), title, message, timestamp: +timestamp }; +function createBroadcast(id, title, message, timestamp = Date.now(), expires = undefined) { + return { id: String(id), title, message, timestamp: +timestamp, expires: expires !== undefined ? +expires : undefined }; } /** @@ -298,6 +298,36 @@ let migrationsTo = { } }, 50); }, + "7.8.6": function (currentVersion, previousVersion) { + saveBroadcasts([ + createBroadcast( + 670, + "Schoology Plus Fall 2023 Survey", + ` +
+ Take the Schoology Plus Fall 2023 Survey! +

Occasionally we run this survey to understand how best to improve Schoology Plus for our users.

+

Spend 10 minutes completing this year's survey and you'll be entered into a giveaway for one of + 20 Amazon gift cards totaling $150 + : ten $10 cards and ten $5 cards, so your chance of winning is higher than ever before! +

+

Thank you for helping improve Schoology Plus! Your feedback is incredibly valuable to us and will likely impact to what extent Schoology Plus is improved in the future.

+

Click here to visit survey.schoologypl.us and take the survey now!

+
+ `, + new Date(2023, 9 /* October */, 15), + new Date(2023, 11 /* December */, 1) // expiration date + ) + ]); + + if (Date.now() < new Date(2023, 11 /* December */, 1)) { + showToast("Take the Schoology Plus Survey!", "Enter to win one of 20 Amazon gift cards!", "yellow", { + buttons: [ + createToastButton("Take Survey!", "toast-take-splus-survey-fall2023", (i, t, b) => window.open(`https://survey.schoologypl.us?source=ExtensionToast&domain=${location.hostname}`, "_blank")) + ] + }); + } + } }; async function versionSpecificFirstLaunch(currentVersion, previousVersion) { diff --git a/manifest.json b/manifest.json index e6be670e..e7acd4e1 100644 --- a/manifest.json +++ b/manifest.json @@ -10,7 +10,7 @@ "update_url": "https://schoologypl.us/firefox_updates.json" } }, - "version": "7.8.5", + "version": "7.8.6", "icons": { "128": "imgs/icon@128.png", "64": "imgs/icon@64.png",