Untitled
unknown
plain_text
2 years ago
1.6 kB
7
Indexable
(function() {
const speedFactor = 20; // Change this to the desired speed multiplier. Higher values make timers run faster.
const originalSetTimeout = window.setTimeout;
const originalSetInterval = window.setInterval;
window.setTimeout = function(callback, delay, ...args) {
return originalSetTimeout(callback, delay / speedFactor, ...args);
};
window.setInterval = function(callback, delay, ...args) {
return originalSetInterval(callback, delay / speedFactor, ...args);
};
})();
// Find the countdownText variable in the existing script
var countdownText = null;
var scriptElements = document.querySelectorAll('script');
for (var i = 0; i < scriptElements.length; i++) {
var scriptText = scriptElements[i].textContent;
if (scriptText.indexOf('countdownText') !== -1) {
countdownText = scriptText.match(/countdownText\s*=\s*"([^"]*)"/)[1];
break;
}
}
if (!countdownText) {
console.error('Could not find countdownText variable in existing script');
} else {
// Get a reference to the countdown element
var countdownSelector = "#countdown";
// Get the current countdown value
var currentCountdown = jQuery(countdownSelector).text().match(/\d+/)[0];
// Increase the countdown by 20x
var newCountdown = currentCountdown * 20;
// Update the countdown element
var countdownHtml = countdownText.replace(/\{\{count\}\}/g, newCountdown);
jQuery(countdownSelector).html(countdownHtml);
}
// JavaScript
document.querySelectorAll('.to').forEach(element => element.style.display = 'block');
Editor is loading...