Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save cuylerstuwe/f71693db8aabdc3e3212718bdc219d24 to your computer and use it in GitHub Desktop.

Select an option

Save cuylerstuwe/f71693db8aabdc3e3212718bdc219d24 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name CSW Parent Frame (Post-Mobius) Shrink Active Task
// @namespace salembeats
// @version 1
// @description .
// @author Cuyler Stuwe (salembeats)
// @include https://work.crowdsurfwork.com/tasks/*
// @grant none
// ==/UserScript==
async function main() {
const pageHeader = document.querySelector(".pageheader");
await new Promise((resolve, reject) => {
const intervalHandle = setInterval(() => {
const trimmedText = pageHeader.innerText.trim();
if(trimmedText) {
clearInterval(intervalHandle);
resolve(trimmedText);
}
}, 100);
});
if(pageHeader.innerText.includes("Active Task")) {
document.body.style.backgroundColor = "rgb(245,255,245)";
}
else {
document.body.style.backgroundColor = "rgb(255,245,245)";
}
pageHeader.style.display = "none";
}
main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment