diff --git a/css/all.css b/css/all.css index 1535f65b..3591f753 100644 --- a/css/all.css +++ b/css/all.css @@ -761,6 +761,12 @@ a._3_bfp { cursor: pointer; } +.splus-mark-completed-check .upcoming-subevents-block .splus-completed-check-indicator { + position: absolute; + right: 16px; + top: 0; +} + .splus-mark-completed-check .splus-assignment-notcomplete .splus-completed-check-indicator::after { color: var(--muted-text) !important; content: "▢"; @@ -773,11 +779,11 @@ a._3_bfp { /* "loading" state to avoid vertical scrolling when transitioning from 'forced completed' to 'query state' */ /* animated spin. default center,center rotate origin appears to be slightly off, but not likely to be noticeable for <1s load times. */ -.splus-mark-completed-check .course-event:not(.splus-assignment-complete):not(.splus-assignment-notcomplete) .splus-completed-check-indicator { +.splus-mark-completed-check .upcoming-event:not(.upcoming-subevents-block):not(.splus-assignment-complete):not(.splus-assignment-notcomplete) .splus-completed-check-indicator { animation: rotation 0.8s infinite linear; } -.splus-mark-completed-check .course-event:not(.splus-assignment-complete):not(.splus-assignment-notcomplete) .splus-completed-check-indicator::after { +.splus-mark-completed-check .upcoming-event:not(.upcoming-subevents-block):not(.splus-assignment-complete):not(.splus-assignment-notcomplete) .splus-completed-check-indicator::after { color: var(--muted-text) !important; content: "⚆"; } diff --git a/css/modern/all.css b/css/modern/all.css index a3bba731..14c513ef 100644 --- a/css/modern/all.css +++ b/css/modern/all.css @@ -56,6 +56,11 @@ variable-intellisense { color: var(--text); } +[modern=true]:root body { + background: var(--primary) !important; + background-color: var(--primary) !important; +} + [modern=true]:root #youtube-disclaimer { display: inline-block !important; color: var(--text) !important; @@ -145,7 +150,7 @@ variable-intellisense { background-color: var(--primary) !important; } -[modern=true]:root iframe { +[modern=true]:root iframe:not([id^=firefox-screenshots-]) { background-color: white !important; } @@ -744,6 +749,12 @@ variable-intellisense { color: var(--text) !important; } +[modern=true]:root #basic-user-warning { + background-color: var(--highlight) !important; + border: none !important; + border-radius: var(--border-radius) !important; +} + [modern=true]:root .date-header h4 span, [modern=true]:root .s-poll-option-title, [modern=true]:root .s-like-sentence { @@ -828,6 +839,16 @@ variable-intellisense { color: var(--text) !important; } +[modern=true]:root .selected-realm .name-wrapper { + background: var(--secondary) !important; + border-radius: var(--border-radius) !important; +} + +[modern=true]:root .userlist_input input, [modern=true]:root .userlist_input_shadow, [modern=true]:root .userlist_input input[type=text] { + background-color: var(--input) !important; + border-radius: var(--border-radius) !important; +} + [modern=true]:root #edge-filters-btn { background-color: var(--text) !important; color: var(--secondary) !important; @@ -1357,6 +1378,10 @@ variable-intellisense { color: var(--muted-text) !important; } +[modern=true]:root .subevent-count { + background-color: var(--secondary) !important; +} + [modern=true]:root #edit-course-switcher-select-nid-menu { border: var(--modern-border) !important; background-color: var(--secondary); @@ -1399,6 +1424,27 @@ variable-intellisense { color: var(--text); } +[modern=true]:root .shuffleParent div.sshuffleContainer, [modern=true]:root .shuffleParent .mediaThumbContainer { + background: var(--secondary) !important; + border: var(--modern-border) !important; + border-radius: var(--border-radius) !important; +} + +[modern=true]:root .s-media-album-content-container { + background-color: var(--secondary) !important; + border-radius: var(--border-radius) !important; + padding: var(--padding) !important; +} + +[modern=true]:root .created { + color: var(--muted-text) !important; +} + +[modern=true]:root .album-comments { + background: var(--accent) !important; + border: none !important; +} + [modern=true]:root .privatemsg-list td { background-color: var(--accent) !important; } @@ -1481,6 +1527,12 @@ variable-intellisense { border-bottom: var(--modern-border) !important; } +[modern=true]:root .discussion-require-post-notice .warning { + background: var(--highlight) !important; + border: none !important; + border-radius: var(--border-radius) !important; +} + [modern=true]:root .discussion-view .sticky-wrapper h2.page-title { background: var(--primary) !important; } @@ -1901,12 +1953,18 @@ variable-intellisense { border-bottom: var(--border-size) solid var(--input) !important; } -[modern=true]:root .dropbox-viewer-submission-activity, -[modern=true]:root .dropbox-viewer-submission-activity-inner { +[modern=true]:root #dropbox-viewer-wrapper .dropbox-viewer-submission-activity, +[modern=true]:root #dropbox-viewer-wrapper .dropbox-viewer-submission-activity-inner { background-color: var(--primary) !important; color: var(--text) !important; } +[modern=true]:root .popups-dropbox-viewer .popups-close a { + background-color: var(--secondary) !important; + border: var(--modern-border) !important; + height: 16px !important; +} + [modern=true]:root ul#attachment-selector li:hover > a { background-color: var(--accent); } diff --git a/imgs/checkmarks.png b/imgs/checkmarks.png new file mode 100644 index 00000000..33f5d9d1 Binary files /dev/null and b/imgs/checkmarks.png differ diff --git a/imgs/quick-access.png b/imgs/quick-access.png new file mode 100644 index 00000000..a067c4e2 Binary files /dev/null and b/imgs/quick-access.png differ diff --git a/imgs/theme-editor.png b/imgs/theme-editor.png new file mode 100644 index 00000000..261cf0ea Binary files /dev/null and b/imgs/theme-editor.png differ diff --git a/imgs/themes.png b/imgs/themes.png new file mode 100644 index 00000000..5424e3b2 Binary files /dev/null and b/imgs/themes.png differ diff --git a/imgs/what-if-grades.png b/imgs/what-if-grades.png new file mode 100644 index 00000000..578bbd57 Binary files /dev/null and b/imgs/what-if-grades.png differ diff --git a/js/all-idle.js b/js/all-idle.js index fab26c9b..36e35943 100644 --- a/js/all-idle.js +++ b/js/all-idle.js @@ -157,9 +157,10 @@ }); // this delegate has the conditional within it - if (applyCourseAliases) { - applyCourseAliases(filteredList); - } + // TEMPORARY CHANGE: Disable searching for nicknames on DOM updates + // if (applyCourseAliases) { + // applyCourseAliases(filteredList); + // } if (applyThemeIcons && filteredList.length > 0) { applyThemeIcons(); diff --git a/js/all.js b/js/all.js index 4e050cbd..62289be5 100644 --- a/js/all.js +++ b/js/all.js @@ -495,6 +495,12 @@ document.querySelector("#header > header > nav > ul:nth-child(2)").prepend(creat title: "Toggle Theme\n\nUse this button to temporarily disable your Schoology Plus theme if something isn't displaying correctly.", onclick: e => { let newVal = document.documentElement.getAttribute("modern") == "false" ? "true" : "false"; + if(newVal == "false") { + tempTheme = "Schoology Plus"; + } else { + tempTheme = undefined; + } + Theme.apply(Theme.active); document.documentElement.setAttribute("modern", newVal); trackEvent("modern-theme-toggle", newVal, "Navbar Button"); }, @@ -1095,6 +1101,9 @@ function indicateSubmittedAssignments() { // checks on the backend if an assignment is complete (submitted) // does not check user overrides async function isAssignmentCompleteAsync(assignmentId) { + if (assignmentId == null) { + return false; + } try { let revisionData = await fetchApiJson(`dropbox/${assignmentId}/${getUserId()}`); let revisions = revisionData.revision; @@ -1108,8 +1117,7 @@ function indicateSubmittedAssignments() { // checks user override for assignment completion function isAssignmentMarkedComplete(assignmentId) { - let overrides = Setting.getValue(completionOverridesSetting); - return !!(overrides && overrides[assignmentId]); + return !!Setting.getNestedValue(completionOverridesSetting, assignmentId); } function setAssignmentCompleteOverride(assignmentId, isComplete) { @@ -1154,11 +1162,11 @@ function indicateSubmittedAssignments() { // returns assignment ID for convenience async function processAssignmentUpcomingAsync(eventElement) { - let infotipElement = eventElement.querySelector(".infotip"); + let infotipElement = eventElement.querySelector(".infotip, .singleday"); let assignmentElement = infotipElement.querySelector("a[href]"); // TODO errorcheck the assignmentId match - let assignmentId; + let assignmentId = null; if (assignmentElement.href.includes("/assignment/")) { assignmentId = assignmentElement.href.match(/assignment\/(\d+)/)[1]; } else if (assignmentElement.href.includes("/course/")) { @@ -1177,7 +1185,7 @@ function indicateSubmittedAssignments() { } if (!eventElement.querySelector(".splus-completed-check-indicator")) { - infotipElement.insertAdjacentElement("afterend", createAssignmentSubmittedCheckmarkIndicator(eventElement, assignmentId)); + infotipElement.insertAdjacentElement(infotipElement.classList.contains("singleday") ? "afterbegin" : "afterend", createAssignmentSubmittedCheckmarkIndicator(eventElement, assignmentId)); } return assignmentId; @@ -1203,16 +1211,14 @@ function indicateSubmittedAssignments() { break; } - // filter to course-event to avoid generic calendar events - let upcomingEventElements = upcomingList.querySelectorAll(".upcoming-event.course-event"); + let upcomingEventElements = upcomingList.querySelectorAll(".upcoming-event:not(.upcoming-subevents-block)"); for (let eventElement of upcomingEventElements) { try { - // TODO only process if it's an assignment, not (e.g.) a calendar event idSet.add(await processAssignmentUpcomingAsync(eventElement)); } catch (err) { - Logger.error(`Failed checking assignment '${eventElement.querySelector(".infotip a[href]").href}' : `, err); + Logger.error(`Failed checking assignment '${eventElement.querySelector(".infotip a[href]")?.href}' : `, err); } } } diff --git a/js/grades.js b/js/grades.js index c9570ae5..0c8b0861 100644 --- a/js/grades.js +++ b/js/grades.js @@ -1,3 +1,5 @@ +while (!window.splusPreload) { } + const timeout = ms => new Promise(res => setTimeout(res, ms)); const BUG_REPORT_FORM_LINK = "https://docs.google.com/forms/d/e/1FAIpQLScF1_MZofOWT9pkWp3EfKSvzCPpyevYtqbAucp1K5WKGlckiA/viewform?entry.118199430="; const SINGLE_COURSE = window.location.href.includes("/course/"); diff --git a/js/version-specific.js b/js/version-specific.js index 80fc4445..454e41f2 100644 --- a/js/version-specific.js +++ b/js/version-specific.js @@ -334,6 +334,16 @@ let migrationsTo = { openModal("choose-theme-modal"); } }, 50); + }, + "7.1": function (currentVersion, previousVersion) { + saveBroadcasts([ + createBroadcast( + 710, + "Course Nicknames Under Maintenance", + "Due to performance concerns, course nicknames may not show up in every place you're used to seeing them. We're working on a fix so hopefully this can be resolved as soon as possible. Thanks for your patience.", + new Date(2021, 0 /* January */, 16) + ) + ]); } }; diff --git a/manifest.json b/manifest.json index 755371b8..1def3d92 100644 --- a/manifest.json +++ b/manifest.json @@ -9,7 +9,7 @@ "id": "schoology.plus@aopell.me" } }, - "version": "7.0", + "version": "7.1", "icons": { "128": "imgs/icon@128.png", "64": "imgs/icon@64.png", diff --git a/scss/modern/all.scss b/scss/modern/all.scss index f59347a3..15a9148e 100644 --- a/scss/modern/all.scss +++ b/scss/modern/all.scss @@ -57,6 +57,11 @@ variable-intellisense { color: var(--text); } + body { + background: var(--primary) !important; + background-color: var(--primary) !important; + } + #youtube-disclaimer { display: inline-block !important; color: var(--text) !important; @@ -153,7 +158,7 @@ variable-intellisense { background-color: var(--primary) !important; } - iframe { + iframe:not([id^=firefox-screenshots-]) { // iframe must be white, because we can't change styles within it background-color: white !important; } @@ -798,6 +803,12 @@ variable-intellisense { } } + #basic-user-warning { + background-color: var(--highlight) !important; + border: none !important; + border-radius: var(--border-radius) !important; + } + .date-header h4 span, .s-poll-option-title, .s-like-sentence { @@ -883,6 +894,16 @@ variable-intellisense { color: var(--text) !important; } + .selected-realm .name-wrapper { + background: var(--secondary) !important; + border-radius: var(--border-radius) !important; + } + + .userlist_input input, .userlist_input_shadow, .userlist_input input[type=text] { + background-color: var(--input) !important; + border-radius: var(--border-radius) !important; + } + #edge-filters-btn { background-color: var(--text) !important; color: var(--secondary) !important; @@ -1467,6 +1488,10 @@ variable-intellisense { color: var(--muted-text) !important; } + .subevent-count { + background-color: var(--secondary) !important; + } + #edit-course-switcher-select-nid-menu { border: var(--modern-border) !important; background-color: var(--secondary); @@ -1509,6 +1534,29 @@ variable-intellisense { color: var(--text); } + // Photo Albums + + .shuffleParent div.sshuffleContainer, .shuffleParent .mediaThumbContainer { + background: var(--secondary) !important; + border: var(--modern-border) !important; + border-radius: var(--border-radius) !important; + } + + .s-media-album-content-container { + background-color: var(--secondary) !important; + border-radius: var(--border-radius) !important; + padding: var(--padding) !important; + } + + .created { + color: var(--muted-text) !important; + } + + .album-comments { + background: var(--accent) !important; + border: none !important; + } + // Messages .privatemsg-list { @@ -1600,6 +1648,12 @@ variable-intellisense { // Discussion Board + .discussion-require-post-notice .warning { + background: var(--highlight) !important; + border: none !important; + border-radius: var(--border-radius) !important; + } + .discussion-view { .sticky-wrapper h2.page-title { background: var(--primary) !important; @@ -2086,10 +2140,18 @@ variable-intellisense { border-bottom: var(--border-size) solid var(--input) !important; } - .dropbox-viewer-submission-activity, - .dropbox-viewer-submission-activity-inner { - background-color: var(--primary) !important; - color: var(--text) !important; + #dropbox-viewer-wrapper { + .dropbox-viewer-submission-activity, + .dropbox-viewer-submission-activity-inner { + background-color: var(--primary) !important; + color: var(--text) !important; + } + } + + .popups-dropbox-viewer .popups-close a { + background-color: var(--secondary) !important; + border: var(--modern-border) !important; + height: 16px !important; } ul#attachment-selector li:hover>a {