Skip to content

Instantly share code, notes, and snippets.

@CoderCowMoo
Last active October 15, 2021 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CoderCowMoo/8e691765e04793e5c21c90b0fdc53ed0 to your computer and use it in GitHub Desktop.
Save CoderCowMoo/8e691765e04793e5c21c90b0fdc53ed0 to your computer and use it in GitHub Desktop.
This userscript makes compass classes dark by changing their css to the colour without !important afterwards.
// ==UserScript==
// @name Make compass classes dark.
// @namespace http://tampermonkey.net/
// @version 1.2
// @description Because the css of compasses classes listing has "!important" in the 'background-color:' DarkReader won't work. This changes that.
// @author CoderCowMoo
// @match https://*.compass.education/
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @icon https://www.google.com/s2/favicons?domain=compass.education
// @grant none
// ==/UserScript==
(function() {
'use strict';
waitForKeyElements(".x-cal-default", darkify);
function darkify() {
var classes = document.getElementsByClassName('activity-type-1');
for(var i = 0; i < classes.length; i++) {
classes[i].style["background-color"] = "rgb(220, 230, 244)";
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment