Last active
February 11, 2025 18:12
-
-
Save Karmalakas/dd3e9d1744a67dd6fd2272c652bbea66 to your computer and use it in GitHub Desktop.
Mark challenge when boost is available
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 GuruShots boost notifier | |
| // @description Mark challenge when boost is available | |
| // @namespace http://karmalakas.lt/ | |
| // @version 1.1.1 | |
| // @author Karmalakas | |
| // @updateURL https://github.com/Karmalakas/gurushots-user-scripts/raw/refs/heads/main/script/boost-notifier/script.user.js | |
| // @downloadURL https://github.com/Karmalakas/gurushots-user-scripts/raw/refs/heads/main/script/boost-notifier/script.user.js | |
| // @supportURL https://github.com/Karmalakas/gurushots-user-scripts/issues | |
| // @match https://gurushots.com/* | |
| // @run-at document-idle | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| var mutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; | |
| function process() { | |
| var buttons = document.querySelectorAll( | |
| 'app-active-challenge-action-button-component .blink[class^="boost"],app-active-challenge-action-button-component .blink[class*=" boost"]' | |
| ); | |
| if (!buttons.length) { | |
| return; | |
| } | |
| for (var i = 0; i < buttons.length; i++) { | |
| processButton(buttons[i]); | |
| } | |
| } | |
| function processButton(button) { | |
| var challengeHolder = button.closest('challenges-item').style['boxShadow'] = '0 0 0 7px rgba(151,255,151,0.75)'; | |
| } | |
| if (mutationObserver) { | |
| var body = document.querySelector('body'); | |
| if (!body) { | |
| return; | |
| } | |
| (new mutationObserver(process)).observe(body, { | |
| 'childList': true, | |
| 'subtree': true | |
| }); | |
| } | |
| })(); |
Author
Author
@Samoiedo77, script updated to v1.1.0 π
Thanks man! It works like a charm! ππΌ
Author
Caution
This gist was moved to a separate repo and will no longer be updated
Please visit the new update URL to re-install to the latest version or wait for updates to appear on TamperMonkey
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Will do π Just need to get the boost myself and be available to code at that time π
Thanks for letting me know π