From ddc952119df665fe20acaf13ea39d252412906f4 Mon Sep 17 00:00:00 2001 From: Aaron Opell Date: Sat, 5 Dec 2020 13:54:22 -0800 Subject: [PATCH 1/3] fixed checkmarks on course dashboard --- js/dashboard.js | 2 -- js/home.js | 4 ++-- manifest.json | 15 +++------------ 3 files changed, 5 insertions(+), 16 deletions(-) delete mode 100644 js/dashboard.js diff --git a/js/dashboard.js b/js/dashboard.js deleted file mode 100644 index 6a8e5a0b..00000000 --- a/js/dashboard.js +++ /dev/null @@ -1,2 +0,0 @@ -indicateSubmittedAssignments(); -createQuickAccess(); \ No newline at end of file diff --git a/js/home.js b/js/home.js index 72a607a6..ce78e903 100644 --- a/js/home.js +++ b/js/home.js @@ -1,7 +1,7 @@ /** @typedef {{id:number,title:string,message:string,timestamp?:Date,icon?:string}} Broadcast */ let homeFeedContainer = document.getElementById("home-feed-container"); -let feed = homeFeedContainer.querySelector(".feed .item-list .s-edge-feed"); +let feed = homeFeedContainer && homeFeedContainer.querySelector(".feed .item-list .s-edge-feed"); /** * Creates a post from a broadcast @@ -75,7 +75,7 @@ function formatDateAsString(date) { return `${date.toLocaleString("en-US", { weekday: "short" })} ${date.toLocaleString("en-US", { year: "numeric", month: "long", day: "numeric" })} at ${date.toLocaleString("en-US", { hour: "numeric", minute: "2-digit" }).toLowerCase()}`; } -if (Setting.getValue("broadcasts") !== "disabled") { +if (homeFeedContainer && Setting.getValue("broadcasts") !== "disabled") { (function () { let observer = new MutationObserver(function (mutations) { if (mutations.length == 0) { diff --git a/manifest.json b/manifest.json index 826b97da..92f95cab 100644 --- a/manifest.json +++ b/manifest.json @@ -161,25 +161,16 @@ "https://lms.lausd.net/home", "https://lms.lausd.net/home#*", "https://lms.lausd.net/home/recent-activity*", + "https://lms.lausd.net/home/course-dashboard*", "https://*.schoology.com/", "https://*.schoology.com/home", "https://*.schoology.com/home#*", - "https://*.schoology.com/home/recent-activity*" - ], - "js": [ - "js/course.js", - "js/home.js" - ], - "run_at": "document_end" - }, - { - "matches": [ - "https://lms.lausd.net/home/course-dashboard*", + "https://*.schoology.com/home/recent-activity*", "https://*.schoology.com/home/course-dashboard*" ], "js": [ "js/course.js", - "js/dashboard.js" + "js/home.js" ], "run_at": "document_end" }, From c4426873305eb2372933ee5b75bfe737e1a866a2 Mon Sep 17 00:00:00 2001 From: Aaron Opell Date: Sat, 5 Dec 2020 14:28:23 -0800 Subject: [PATCH 2/3] Updated version specific --- js/version-specific.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/version-specific.js b/js/version-specific.js index b1484329..64b3553f 100644 --- a/js/version-specific.js +++ b/js/version-specific.js @@ -274,9 +274,6 @@ let migrationsTo = { } }, "6.7": function (currentVersion, previousVersion) { - // reset setting value so people have checklists enabled by default - Setting.setValue("indicateSubmission", undefined); - // survey announcement saveBroadcasts([ createBroadcast( @@ -313,6 +310,10 @@ let migrationsTo = { createToastButton("Take Survey!", "toast-take-splus-survey-fall2020", (i, t, b) => window.open(`http://survey.schoologypl.us?source=ExtensionToast&domain=${location.hostname}`, "_blank")) ] }) + }, + "6.7.1": function (currentVersion, previousVersion) { + // reset setting value so people have checklists enabled by default + Setting.setValue("indicateSubmission", undefined); } }; From 48ccafa288ff03efbce4d6a99ac2e72360be6072 Mon Sep 17 00:00:00 2001 From: Aaron Opell Date: Sat, 5 Dec 2020 16:04:38 -0800 Subject: [PATCH 3/3] bump version to 6.7.1 --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 92f95cab..fc98c341 100644 --- a/manifest.json +++ b/manifest.json @@ -9,7 +9,7 @@ "id": "schoology.plus@aopell.me" } }, - "version": "6.7", + "version": "6.7.1", "icons": { "128": "imgs/icon@128.png", "64": "imgs/icon@64.png",