Skip to content

Commit

Permalink
Merge pull request #232 from aopell/develop
Browse files Browse the repository at this point in the history
Version 6.7.1
  • Loading branch information
aopell authored Dec 6, 2020
2 parents beef032 + 48ccafa commit a10122f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 20 deletions.
2 changes: 0 additions & 2 deletions js/dashboard.js

This file was deleted.

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

Expand Down
17 changes: 4 additions & 13 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"id": "[email protected]"
}
},
"version": "6.7",
"version": "6.7.1",
"icons": {
"128": "imgs/[email protected]",
"64": "imgs/[email protected]",
Expand Down Expand Up @@ -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"
},
Expand Down

0 comments on commit a10122f

Please sign in to comment.