Skip to content

Instantly share code, notes, and snippets.

@L0laapk3
Created June 8, 2021 17:26
Show Gist options
  • Save L0laapk3/db02b1b402a96dfc62675e8ca83a9de3 to your computer and use it in GitHub Desktop.
Save L0laapk3/db02b1b402a96dfc62675e8ca83a9de3 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name yare.io less delay
// @namespace http://tampermonkey.net/
// @version 1.0
// @author L0laapk3
// @match yare.io/d1/*
// @run-at document-idle
// @grant none
// ==/UserScript==
(function() {
'use strict';
const _setInterval = window.setInterval;
window.setInterval = (f, t) => {
if (t == 1000) { // prevent the first instance of setinterval with t = 1000
_setInterval(_ => {
window.tick_counter = window.incoming.t; // update tick counter to latest received packet
f();
}, t);
window.setInterval = _setInterval; // remove proxy function
} else
_setInterval(f, t)
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment