Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Cookie Clicker Add-Ons
- // @namespace Cookie
- // @include https://orteil.dashnet.org/cookieclicker/
- // @version 0.0.1
- // @grant none
- // ==/UserScript==
- mods = [
- 'https://aktanusa.github.io/CookieMonster/CookieMonster.js',
- 'https://bitbucket.org/Acharvak/cookie-clicker-agronomicon/downloads/Agronomicon.js',
- ]
- function tryLoadMods(delay_ms) {
- if(typeof unsafeWindow.Game !== undefined && unsafeWindow.Game.ready) {
- console.log('Loading mods!')
- mods.forEach(unsafeWindow.Game.LoadMod)
- } else {
- console.log('Game not ready, trying again in ' + delay_ms/1000 + ' seconds...')
- // exponential backoff
- setTimeout(() => tryLoadMods(delay_ms * 2), delay_ms)
- }
- }
- setTimeout(() => tryLoadMods(200), 1000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement