diff --git a/css/modern/all.css b/css/modern/all.css index 7440fa2..4dfc81d 100644 --- a/css/modern/all.css +++ b/css/modern/all.css @@ -1931,6 +1931,10 @@ variable-intellisense { color: var(--text) !important; } +[modern=true]:root .porcelain_pattern { + background: var(--accent) !important; +} + [modern=true]:root .fc-state-highlight { background: var(--active) !important; } @@ -2141,9 +2145,8 @@ variable-intellisense { color: var(--text) !important; } -[modern=true][dark=true]:root .assessment-delivery-landing-app div._3dHTa::after { - content: "WARNING: A dark theme is enabled and might prevent you from reading certain questions. If you can't read a question, you can temporarily disable dark theme using the Toggle Theme button on the navigation bar."; - display: block; +[modern=true][dark=true]:root #assessment-darktheme-warning-message[data-popup=true] { + display: block !important; text-align: center; width: 50%; margin-left: 25%; @@ -2154,6 +2157,15 @@ variable-intellisense { border-radius: var(--border-radius); } +[modern=true][dark=true]:root #assessment-darktheme-warning-message .click-to-hide { + padding-top: 10px !important; +} + +[modern=true][dark=true]:root #assessment-darktheme-warning-message .click-to-hide span { + text-decoration: underline; + cursor: pointer; +} + [modern=true]:root .mathquill-formula { filter: Invert(var(--theme-is-dark)) !important; } diff --git a/css/modern/theme-editor.css b/css/modern/theme-editor.css index 2ac57c8..9ef81aa 100644 --- a/css/modern/theme-editor.css +++ b/css/modern/theme-editor.css @@ -200,3 +200,7 @@ variable-intellisense { transition: .3s ease-out !important; color: var(--modern-contrast-text) !important; } + +[modern=true]:root #create-preset-dropdown > li:hover { + background-color: var(--modern-active); +} diff --git a/js/all-idle.js b/js/all-idle.js index 84ee02d..43cb8e9 100644 --- a/js/all-idle.js +++ b/js/all-idle.js @@ -1,4 +1,4 @@ -(async function() { +(async function () { // Wait for loader.js to finish running while (!window.splusLoaded) { await new Promise(resolve => setTimeout(resolve, 10)); @@ -356,6 +356,39 @@ }).observe(document.getElementById("body"), { attributes: true, attributeFilter: ["aria-hidden"] }); })(); +(function () { + setTimeout(() => { + let assessmentStartContainer = document.querySelector(`.assessment-delivery-landing-app div._3dHTa`); + + if (assessmentStartContainer) { + assessmentStartContainer.appendChild( + createElement( + "div", + [], + { + id: "assessment-darktheme-warning-message", + textContent: "WARNING: A dark theme is enabled and might prevent you from reading certain questions. If you can't read a question, you can temporarily disable dark theme using the Toggle Theme button on the navigation bar.", + dataset: { popup: Setting.getNestedValue("popup", "assessmentDarkThemeWarning", true) }, + style: { display: "none" } + }, + [ + createElement("p", ["click-to-hide"], {}, [ + createElement("span", [], { textContent: "Hide this once", onclick: () => document.getElementById("assessment-darktheme-warning-message").remove() }), + createElement("b", [], { textContent: " • " }), + createElement("span", [], { + textContent: "Never show again", onclick: () => { + Setting.setNestedValue("popup", "assessmentDarkThemeWarning", false); + document.getElementById("assessment-darktheme-warning-message").dataset.popup = "false"; + } + }), + ]) + ] + ) + ) + } + }, 1000); +})(); + function parseSettingsHash() { let hashes = location.hash.split('#'); if (hashes.length > 1 && hashes[1] === "splus-settings") { diff --git a/js/all.js b/js/all.js index d6ae5ce..c0aa600 100644 --- a/js/all.js +++ b/js/all.js @@ -239,7 +239,7 @@ let modals = [ "contributors-modal", "Schoology Plus Contributors", createElement("div", ["splus-modal-contents"], undefined, [ - createElement("h2", ["setting-entry"], { textContent: "Contributors" }), + createElement("h2", ["setting-entry"], { textContent: "Lead Developers" }), createElement("div", ["setting-entry"], {}, [ createElement("h3", ["setting-title"], {}, [ createElement("a", [], { href: "https://github.com/aopell", textContent: "Aaron Opell (@aopell)" }) @@ -252,65 +252,92 @@ let modals = [ ]), createElement("p", ["setting-description"], { textContent: "Lead developer" }) ]), + createElement("h2", ["setting-entry"], { textContent: "Code Contributions" }), createElement("div", ["setting-entry"], {}, [ - createElement("h3", ["setting-title"], {}, [ - createElement("a", [], { href: "https://github.com/xd-arsenic", textContent: "Alexander (@xd-arsenic)" }), - createElement("span", [], { textContent: ", " }), - createElement("a", [], { href: "https://github.com/Roguim", textContent: "@Roguim" }), - createElement("span", [], { textContent: ", " }), - createElement("a", [], { href: "https://github.com/reteps", textContent: "Peter Stenger (@reteps)" }), - createElement("span", [], { textContent: ", " }), - createElement("a", [], { href: "https://github.com/EricPedley", textContent: "Eric Pedley (@EricPedley)" }), - createElement("span", [], { textContent: ", and " }), - createElement("a", [], { href: "https://github.com/KTibow", textContent: "@KTibow" }), - ]), - createElement("p", ["setting-description"], { textContent: "Various code contributions" }) + createElement("ul", ["contributor-list"], { + style: { listStyle: "inside" }, + innerHTML: (function (contribs) { + let retVal = ""; + for (let i = 0; i < contribs.length; i++) { + if (contribs[i].url) { + retVal += `
  • ${contribs[i].name}
  • `; + } else { + retVal += `
  • ${contribs[i].name}
  • ` + } + } + return retVal; + })([ + { name: "Alexander (@xd-arsenic)", url: "https://github.com/xd-arsenic" }, + { name: "@Roguim", url: "https://github.com/Roguim" }, + { name: "Peter Stenger (@reteps)", url: "https://github.com/reteps" }, + { name: "Eric Pedley (@EricPedley)", url: "https://github.com/EricPedley" }, + { name: "@KTibow", url: "https://github.com/KTibow" }, + ]) + }), ]), + createElement("h2", ["setting-entry"], { textContent: "Testing, Bug Reporting, and/or Discord Moderation" }), createElement("div", ["setting-entry"], {}, [ - createElement("h3", ["setting-title"], {}, [ - // contributors list - createElement("span", [], { - innerHTML: (function (contribs) { - let retVal = ""; - for (let i = 0; i < contribs.length; i++) { - retVal += `${contribs[i]}`; - if (i == contribs.length - 2) { - retVal += ", and "; - } else if (i != contribs.length - 1) { - retVal += ", "; - } + createElement("ul", ["contributor-list"], { + style: { listStyle: "inside" }, + innerHTML: (function (contribs) { + let retVal = ""; + for (let i = 0; i < contribs.length; i++) { + if (contribs[i].url) { + retVal += `
  • ${contribs[i].name}
  • `; + } else { + retVal += `
  • ${contribs[i].name}
  • ` } - return retVal; - })(["DinosoftLabs", "Eucalyp", "Flat Icons", "Freepik", "Maxim Basinski", "Pixel Buddha", "Smashicons", "Twitter", "Vectors Market", "Vitaly Gorbachev", "srip", "surang", "Pixelmeetup", "photo3idea_studio"]) - }), - createElement("span", [], { textContent: " from " }), - createElement("a", [], { href: "https://www.flaticon.com/", textContent: "flaticon.com" }) - ]), + } + return retVal; + })([ + { name: "atomicproton#4444" }, + { name: "penguinee232#7792" }, + { name: "Cody Lomeli" }, + { name: "Airbus A330-200#0001" }, + { name: "Ark#9999" }, + { name: "ASAMU#1919" }, + { name: "Baconnated Churro#4954" }, + { name: "Blumiere#7442" }, + { name: "Krishy Fishy#3333" }, + { name: "meepypotato07#7816" }, + { name: "phool#0200" }, + { name: "RVxBot#7862" }, + { name: "TechFun#9234" }, + ]) + }), + ]), + createElement("h2", ["setting-entry"], { textContent: "Icons and Images" }), + createElement("div", ["setting-entry"], {}, [ + + createElement("ul", ["contributor-list"], { + style: { listStyle: "inside" }, + innerHTML: (function (contribs) { + let retVal = ""; + for (let i = 0; i < contribs.length; i++) { + retVal += `
  • ${contribs[i]}
  • `; + } + return retVal; + })(["DinosoftLabs", "Eucalyp", "Flat Icons", "Freepik", "Maxim Basinski", "Pixel Buddha", "Smashicons", "Twitter", "Vectors Market", "Vitaly Gorbachev", "srip", "surang", "Pixelmeetup", "photo3idea_studio"]) + }), + ]), + createElement("div", ["setting-entry"], {}, [ createElement("p", ["setting-description"], {}, [ createElement("span", [], { textContent: "Many custom course icons (under " }), - createElement("a", [], { href: "http://creativecommons.org/licenses/by/3.0/", title: "Creative Commons BY 3.0", target: "_blank", textContent: "CC BY 3.0" }), - createElement("span", [], { textContent: ")" }), + createElement("a", [], { href: "https://creativecommons.org/licenses/by/3.0/", title: "Creative Commons BY 3.0", target: "_blank", textContent: "CC BY 3.0" }), + createElement("span", [], { textContent: ") from " }), + createElement("a", [], { href: "https://www.flaticon.com/", title: "flaticon", target: "_blank", textContent: "flaticon.com" }), createElement("p", [], { textContent: "Bundled:" }), createElement("div", ["splus-indent-1"], { innerHTML: - '