Skip to content

Instantly share code, notes, and snippets.

@dsetzer
Created March 18, 2019 07:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dsetzer/5e8d71df75eff19de0ab1d2eed1767a3 to your computer and use it in GitHub Desktop.
Save dsetzer/5e8d71df75eff19de0ab1d2eed1767a3 to your computer and use it in GitHub Desktop.
var checkInterval = 10;
Window.prototype.targetLimiter = function (checkInterval) {
setImmediate(() => {
window.setInterval(() => {
if (window.document.getElementsByName('target')[0].value < 1.5) {
window.document.getElementsByName('target')[0].value = 1.5;
}
}, checkInterval);
});
}
window.targetLimiter(checkInterval);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment