Advertisement
637275

cookie clicker mods greasemonkey script

Jul 21st, 2019
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Cookie Clicker Add-Ons
  3. // @namespace Cookie
  4. // @include https://orteil.dashnet.org/cookieclicker/
  5. // @version 0.0.1
  6. // @grant none
  7. // ==/UserScript==
  8.  
  9. mods = [
  10. 'https://aktanusa.github.io/CookieMonster/CookieMonster.js',
  11. 'https://bitbucket.org/Acharvak/cookie-clicker-agronomicon/downloads/Agronomicon.js',
  12. ]
  13.  
  14. function tryLoadMods(delay_ms) {
  15. if(typeof unsafeWindow.Game !== undefined && unsafeWindow.Game.ready) {
  16. console.log('Loading mods!')
  17. mods.forEach(unsafeWindow.Game.LoadMod)
  18. } else {
  19. console.log('Game not ready, trying again in ' + delay_ms/1000 + ' seconds...')
  20. // exponential backoff
  21. setTimeout(() => tryLoadMods(delay_ms * 2), delay_ms)
  22. }
  23. }
  24.  
  25. setTimeout(() => tryLoadMods(200), 1000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement