Skip to content

Commit

Permalink
Disable on quizzing pages
Browse files Browse the repository at this point in the history
  • Loading branch information
preyansh98 committed Dec 24, 2021
1 parent a0f0f3d commit cd37556
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ const darkenElementsByClassName = (classesToDarken) => {
const darken = () => {
let classesToDarken = [];

// Stop darken on quiz page.
if (window.location.href.includes('quizzing')) {
return;
}

//Body
if(document.getElementsByClassName('d2l-body').length > 0)
document.getElementsByClassName('d2l-body')[0].style.backgroundColor = _color;
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Darkenify",
"author": "Preyansh Kaushik",
"version": "1.0.1",
"version": "1.0.2",
"description": "Add Dark Mode to McGill MyCourses!",
"homepage_url": "https://github.com/preyansh98/darkenify",
"icons": {
Expand Down

0 comments on commit cd37556

Please sign in to comment.