Guest User

Untitled

a guest
Nov 1st, 2025
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 1.64 KB | Source Code | 0 0
  1. // ==UserScript==
  2. // @name         Cookie Clicker Premium
  3. // @namespace    http://tampermonkey.net/
  4. // @version      2.0
  5. // @description  Sets Game.heralds to 100 and forces wrapper class to offWeb
  6. // @match        *://*/*
  7. // @grant        none
  8. // ==/UserScript==
  9.  
  10. (function() {
  11.     'use strict';
  12.  
  13.     const CHECK_INTERVAL = 500; // ms
  14.  
  15.     const interval = setInterval(() => {
  16.         if (typeof window.Game !== 'undefined') {
  17.             // Force heralds
  18.             try { Game.heralds = 100; } catch {}
  19.             try {
  20.                 Object.defineProperty(Game, 'heralds', {
  21.                     get: () => 100,
  22.                     set: () => {},
  23.                     configurable: true
  24.                 });
  25.             } catch {}
  26.  
  27.             // Remove top bar
  28.             const topBar = document.getElementById('topBar');
  29.             if (topBar) topBar.remove();
  30.  
  31.             // Force wrapper to offWeb
  32.             const wrapper = document.getElementById('wrapper');
  33.             wrapper.setAttribute('class', 'offWeb');
  34.             console.log('[HeraldsModifier] Wrapper class forced to offWeb');
  35.  
  36.             // Force layout recalculation (like pressing F11 twice)
  37.             window.dispatchEvent(new Event('resize'));
  38.             document.body.offsetHeight; // trigger reflow
  39.             console.log('[HeraldsModifier] Layout refresh triggered');
  40.  
  41.             clearInterval(interval);
  42.  
  43.             if (!window.__heraldsLogged) {
  44.                 console.log('[HeraldsModifier] Heralds = 100 enforced and wrapper fixed');
  45.                 window.__heraldsLogged = true;
  46.             }
  47.         }
  48.     }, CHECK_INTERVAL);
  49. })();
  50.  
Tags: video game
Advertisement
Add Comment
Please, Sign In to add comment