-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
169 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,78 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# next.js build output | ||
.next | ||
|
||
# nuxt.js build output | ||
.nuxt | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless | ||
|
||
# VSCode data | ||
.vscode | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# next.js build output | ||
.next | ||
|
||
# nuxt.js build output | ||
.nuxt | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless | ||
|
||
# VSCode data | ||
.vscode | ||
|
||
SchoologyPlus.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,91 +1,91 @@ | ||
// patch for arrow menu in Firefox | ||
(function () { | ||
let arrow = document.getElementById("primary-settings"); | ||
let content = arrow.innerHTML; | ||
arrow.innerHTML = ""; | ||
arrow.innerHTML = content; | ||
let arrowMenu = document.querySelector("#primary-settings>a"); | ||
let dropdown = document.getElementById("settings-menu-dropdown"); | ||
arrowMenu.removeAttribute("href"); | ||
arrowMenu.style.cursor = "pointer"; | ||
arrowMenu.addEventListener("click", function (event) { | ||
if (isVisible(dropdown)) { | ||
dropdown.style.display = "none"; | ||
arrowMenu.classList.remove("active"); | ||
} else { | ||
dropdown.style.display = "block"; | ||
arrowMenu.classList.add("active"); | ||
} | ||
}); | ||
document.body.addEventListener("click", function (event) { | ||
if (getParents(event.target, "#primary-settings").length == 0) { | ||
dropdown.style.display = "none"; | ||
arrowMenu.classList.remove("active"); | ||
} | ||
}); | ||
})(); | ||
|
||
// theme loading, with course icon overriding | ||
(function () { | ||
let themesList = document.getElementById("themes-list"); | ||
if (storage.themes) { | ||
for (let t of storage.themes) { | ||
let closeButton = createElement("a", ["close-button"], { textContent: "×", href: "#", title: "Delete Theme", onclick: (event) => deleteTheme(event.target.dataset.themeName) }); | ||
closeButton.dataset.themeName = t.name; | ||
let exportButton = createElement("a", ["export-button"], { textContent: "↗", href: "#", title: "Export Theme", onclick: () => alert("Copied to clipboard") }); | ||
exportButton.dataset.clipboardText = JSON.stringify(t, null, 4); | ||
themesList.appendChild(createElement("h3", ["setting-description"], {}, [ | ||
closeButton, | ||
exportButton, | ||
createElement("span", [], { textContent: " " + t.name }) | ||
])); | ||
} | ||
} | ||
|
||
if (!storage.themes || storage.themes.length === 0) { | ||
themesList.appendChild(createElement("h3", ["close-button"], { textContent: "No themes installed" })); | ||
} | ||
|
||
new Clipboard(".export-button"); | ||
|
||
if (storage.courseIcons != "disabled") { | ||
|
||
Theme.setProfilePictures(); | ||
|
||
let resetIconsOnMutate = function (target, predicate) { | ||
// slight hack: if predicate defined, be broader about observation | ||
// allows the course dashboard junk to work | ||
let config = { childList: true, subtree: !!predicate }; | ||
let observer = new MutationObserver(() => 0); | ||
|
||
let callback = (mutationsList) => { | ||
if (predicate && !predicate(mutationsList)) { | ||
// predicate is defined, but returns false | ||
// not yet | ||
return; | ||
} | ||
|
||
Theme.setProfilePictures(); | ||
observer.disconnect(); | ||
}; | ||
|
||
observer = new MutationObserver(callback); | ||
observer.observe(target, config); | ||
}; | ||
|
||
// courses dropdown (all pages) | ||
let target = document.querySelector(".sections-list"); | ||
if (target) { | ||
// TODO why might this be null? | ||
resetIconsOnMutate(target); | ||
} | ||
// course dashboard | ||
let mainInner = document.getElementById("main-inner"); | ||
|
||
if (mainInner && window.location.pathname == "/home/course-dashboard") { | ||
resetIconsOnMutate(mainInner, function (mutationsList) { | ||
return !!mainInner.querySelector(".course-dashboard .sgy-card-lens"); | ||
}); | ||
} | ||
} | ||
// patch for arrow menu in Firefox | ||
(function () { | ||
let arrow = document.getElementById("primary-settings"); | ||
let content = arrow.innerHTML; | ||
arrow.innerHTML = ""; | ||
arrow.innerHTML = content; | ||
let arrowMenu = document.querySelector("#primary-settings>a"); | ||
let dropdown = document.getElementById("settings-menu-dropdown"); | ||
arrowMenu.removeAttribute("href"); | ||
arrowMenu.style.cursor = "pointer"; | ||
arrowMenu.addEventListener("click", function (event) { | ||
if (isVisible(dropdown)) { | ||
dropdown.style.display = "none"; | ||
arrowMenu.classList.remove("active"); | ||
} else { | ||
dropdown.style.display = "block"; | ||
arrowMenu.classList.add("active"); | ||
} | ||
}); | ||
document.body.addEventListener("click", function (event) { | ||
if (getParents(event.target, "#primary-settings").length == 0) { | ||
dropdown.style.display = "none"; | ||
arrowMenu.classList.remove("active"); | ||
} | ||
}); | ||
})(); | ||
|
||
// theme loading, with course icon overriding | ||
(function () { | ||
let themesList = document.getElementById("themes-list"); | ||
if (storage.themes) { | ||
for (let t of storage.themes) { | ||
let closeButton = createElement("a", ["close-button"], { textContent: "×", href: "#", title: "Delete Theme", onclick: (event) => deleteTheme(event.target.dataset.themeName) }); | ||
closeButton.dataset.themeName = t.name; | ||
let exportButton = createElement("a", ["export-button"], { textContent: "↗", href: "#", title: "Export Theme", onclick: () => alert("Copied to clipboard") }); | ||
exportButton.dataset.clipboardText = JSON.stringify(t, null, 4); | ||
themesList.appendChild(createElement("h3", ["setting-description"], {}, [ | ||
closeButton, | ||
exportButton, | ||
createElement("span", [], { textContent: " " + t.name }) | ||
])); | ||
} | ||
} | ||
|
||
if (!storage.themes || storage.themes.length === 0) { | ||
themesList.appendChild(createElement("h3", ["close-button"], { textContent: "No themes installed" })); | ||
} | ||
|
||
new Clipboard(".export-button"); | ||
|
||
if (storage.courseIcons != "disabled") { | ||
|
||
Theme.setProfilePictures(); | ||
|
||
let resetIconsOnMutate = function (target, predicate) { | ||
// slight hack: if predicate defined, be broader about observation | ||
// allows the course dashboard junk to work | ||
let config = { childList: true, subtree: !!predicate }; | ||
let observer = new MutationObserver(() => 0); | ||
|
||
let callback = (mutationsList) => { | ||
if (predicate && !predicate(mutationsList)) { | ||
// predicate is defined, but returns false | ||
// not yet | ||
return; | ||
} | ||
|
||
Theme.setProfilePictures(); | ||
observer.disconnect(); | ||
}; | ||
|
||
observer = new MutationObserver(callback); | ||
observer.observe(target, config); | ||
}; | ||
|
||
// courses dropdown (all pages) | ||
let target = document.querySelector(".sections-list"); | ||
if (target) { | ||
// TODO why might this be null? | ||
resetIconsOnMutate(target); | ||
} | ||
// course dashboard | ||
let mainInner = document.getElementById("main-inner"); | ||
|
||
if (mainInner && window.location.pathname == "/home/course-dashboard") { | ||
resetIconsOnMutate(mainInner, function (mutationsList) { | ||
return !!mainInner.querySelector(".course-dashboard .sgy-card-lens"); | ||
}); | ||
} | ||
} | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
"update_url": "https://gist.githubusercontent.com/aopell/82a6f5c409dc0af7e97d2ebaf88c84f6/raw/update.json" | ||
} | ||
}, | ||
"version": "3.16", | ||
"version": "3.17", | ||
"icons": { | ||
"128": "imgs/[email protected]", | ||
"64": "imgs/[email protected]", | ||
|