Skip to content

Commit

Permalink
Merge pull request #321 from aopell/develop
Browse files Browse the repository at this point in the history
Version 7.8.6
  • Loading branch information
aopell authored Oct 16, 2023
2 parents 8886556 + 9c1fef6 commit cb9821b
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 12 deletions.
8 changes: 6 additions & 2 deletions css/all.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
}

Expand Down
12 changes: 8 additions & 4 deletions css/modern/all.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -774,19 +778,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;
}

Expand Down
4 changes: 2 additions & 2 deletions js/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
34 changes: 32 additions & 2 deletions js/version-specific.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}

/**
Expand Down Expand Up @@ -298,6 +298,36 @@ let migrationsTo = {
}
}, 50);
},
"7.8.6": function (currentVersion, previousVersion) {
saveBroadcasts([
createBroadcast(
670,
"Schoology Plus Fall 2023 Survey",
`
<div>
<strong style="background: rgba(0,128,255,0.5) !important; color: white !important;">Take the Schoology Plus Fall 2023 Survey!</strong>
<p>Occasionally we run this survey to understand how best to improve Schoology Plus for our users.</p>
<p>Spend 10 minutes completing this year's survey and you'll be entered into a giveaway for one of
<span style="background: rgb(255, 255, 0) !important; color: black !important; font-weight: bold;">20 Amazon gift cards totaling $150</span>
: ten $10 cards and ten $5 cards, so <strong>your chance of winning is higher than ever before!</strong>
</p>
<p>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.</p>
<p><a href="https://survey.schoologypl.us?source=ExtensionBroadcast&domain=${location.hostname}"><strong style="background: rgba(255,60,0,0.5) !important; color: white !important; font-size: 16px;">Click here to visit survey.schoologypl.us and take the survey now!</strong></a></p>
</div>
`,
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) {
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"update_url": "https://schoologypl.us/firefox_updates.json"
}
},
"version": "7.8.5",
"version": "7.8.6",
"icons": {
"128": "imgs/[email protected]",
"64": "imgs/[email protected]",
Expand Down
6 changes: 5 additions & 1 deletion scss/modern/all.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -827,7 +831,7 @@ variable-intellisense {

// Navbar menus

div.les2- {
div.les2-, #header > header ul.util-width-thirty-nine-1B-gb {
background-color: var(--secondary) !important;

._3skcp {
Expand Down

0 comments on commit cb9821b

Please sign in to comment.