Created
May 9, 2018 20:34
-
-
Save cuylerstuwe/f71693db8aabdc3e3212718bdc219d24 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // ==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