Skip to content

Commit

Permalink
Merge pull request #258 from aopell/develop
Browse files Browse the repository at this point in the history
Version 7.2.2
  • Loading branch information
aopell authored Mar 16, 2021
2 parents 25fe2f3 + 0837134 commit 78866e8
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 36 deletions.
7 changes: 6 additions & 1 deletion js/all-idle.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
while (!window.splusLoaded || !window.splusLoaded.has("all")) { }
Logger.debug("Started loading all-idle.js");

// hack for course aliases
(async function () {
let applyCourseAliases = null;
Expand Down Expand Up @@ -368,4 +371,6 @@ parseSettingsHash();
// Handle opening Schoology Plus Settings
window.addEventListener("hashchange", event => {
parseSettingsHash();
});
});

Logger.debug("Finished loading all-idle.js");
3 changes: 2 additions & 1 deletion js/all.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
while (!window.splusLoaded && !window.splusLoaded.has("preload")) { }
while (!window.splusLoaded || !window.splusLoaded.has("preload")) { }
Logger.debug("Started loading all.js");

// Inform user about theme
{
Expand Down
7 changes: 6 additions & 1 deletion js/assessment.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
while (!window.splusLoaded || !window.splusLoaded.has("all")) { }
Logger.debug("Started loading assessment.js");

// modifications to Confirm Submission assessment popup
(function () {
/**
Expand Down Expand Up @@ -78,4 +81,6 @@
childList: true,
subtree: false
});
})();
})();

Logger.debug("Finished loading assessment.js");
7 changes: 5 additions & 2 deletions js/course.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
while (!window.splusLoaded && !window.splusLoaded.has("all")) { }
while (!window.splusLoaded || !window.splusLoaded.has("all")) { }
Logger.debug("Started loading course.js");

let courseIdNumber;
let courseSettingsCourseName;
Expand Down Expand Up @@ -203,4 +204,6 @@ function restoreCourseDefaults() {
location.reload();
});
}
}
}

Logger.debug("Finished loading course.js");
7 changes: 5 additions & 2 deletions js/courses.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
while (!window.splusLoaded && !window.splusLoaded.has("all")) { }
while (!window.splusLoaded || !window.splusLoaded.has("all")) { }
Logger.debug("Started loading courses.js");

for (let course of document.querySelectorAll("li.course-item.list-item")) {
let parent = course.parentNode;
Expand Down Expand Up @@ -70,4 +71,6 @@ $.contextMenu({

if (location.search.includes("reorder")) {
document.querySelector("#reorder-ui .link-btn").click();
}
}

Logger.debug("Finished loading courses.js");
5 changes: 4 additions & 1 deletion js/grades.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
while (!window.splusLoaded && !window.splusLoaded.has("preload")) { }
while (!window.splusLoaded || !window.splusLoaded.has("all")) { }
Logger.debug("Started loading grades.js");

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=";
Expand Down Expand Up @@ -1583,3 +1584,5 @@ function processNonenteredAssignments() {
}, sleep ? 3000 : 0);
}
}

Logger.debug("Finished loading grades.js");
6 changes: 4 additions & 2 deletions js/home.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
while (!window.splusLoaded && !window.splusLoaded.has("all")) { }
while (!window.splusLoaded || !window.splusLoaded.has("all")) { }
Logger.debug("Started loading home.js");

/** @typedef {{id:number,title:string,message:string,timestamp?:Date,icon?:string}} Broadcast */

Expand Down Expand Up @@ -104,4 +105,5 @@ if (homeFeedContainer && Setting.getValue("broadcasts") !== "disabled") {
}

indicateSubmittedAssignments();
createQuickAccess();
createQuickAccess();
Logger.debug("Finished loading home.js");
14 changes: 0 additions & 14 deletions js/mastery.js

This file was deleted.

5 changes: 5 additions & 0 deletions js/materials.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

"use strict";

while (!window.splusLoaded || !window.splusLoaded.has("all")) { }
Logger.debug("Started loading materials.js");

(async function () {
let classId = window.location.pathname.match(/\/course\/(\d+)\/materials/)[1]; // ID of current course ("section"), as a string

Expand Down Expand Up @@ -383,3 +386,5 @@
})().catch(reason => {
Logger.error("Error running materials page modification script: ", reason);
});

Logger.debug("Finished loading materials.js");
5 changes: 4 additions & 1 deletion js/page.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
while (!window.splusLoaded || !window.splusLoaded.has("all")) { }
Logger.debug("Started loading page.js");

// Adds an "Open in New Tab" link to /page pages which simply embed something.
(function () {
const iframe = document.querySelector('.s-page-summary iframe');
Expand Down Expand Up @@ -30,4 +33,4 @@ function processIframeSrc(rawLink) {
return link.href;
}

Logger.log("Loaded page script");
Logger.debug("Finished loading page.js");
12 changes: 1 addition & 11 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"id": "[email protected]"
}
},
"version": "7.2.1",
"version": "7.2.2",
"icons": {
"128": "imgs/[email protected]",
"64": "imgs/[email protected]",
Expand Down Expand Up @@ -193,16 +193,6 @@
],
"run_at": "document_end"
},
{
"matches": [
"https://lms.lausd.net/mastery*",
"https://*.schoology.com/mastery*"
],
"js": [
"js/mastery.js"
],
"run_at": "document_end"
},
{
"matches": [
"https://lms.lausd.net/",
Expand Down

0 comments on commit 78866e8

Please sign in to comment.