Last active
February 6, 2022 04:59
-
-
Save rlemon/4444273 to your computer and use it in GitHub Desktop.
Malicious JS scripts (userscript hell) - NOTE: None of these scripts are actually malicious... just trolling and annoying. No bits will be harmed if you run these.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Rotates the page 180deg when the user hovers over the body. | |
Only works for webkit browsers */ | |
(function() { | |
var s = document.createElement('style'); | |
s.textContent = '.trololol:hover{-webkit-transform: rotate(180deg);'; | |
document.head.appendChild(s); | |
document.body.classList.add('trololol'); | |
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Makes forms unsubmitable | |
Then mocks you in the console like a little bitch... */ | |
[].forEach.call(document.forms, function(form) { | |
form.onsubmit = function(e) { console.log('u mad bro?'); e.preventDefault(); return false; }; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Simulated lag. | |
Setup for upto ten seconds of random lag, randomly, every zero to ten seconds. */ | |
function lag(n/*seconds of lag*/) { | |
var now = new Date().getTime(); | |
while( (new Date().getTime()) - now < n*1000 ) {} | |
} | |
function run() { | |
lag(Math.floor(Math.random()*10)+1); | |
setTimeout(run, Math.random()*10000); | |
} | |
run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Makes links jump around while users try to touch them. | |
Note: Changes the margin, therefore also often shifts other elements on the page */ | |
function r(l) {return Math.floor(Math.random() * l) + 'px';} | |
function e(m) {m.addEventListener('mousemove', o, false);} | |
function o(n) {'A'===n.target.tagName&&(n.target.style.margin=[r(100), r(100), r(100), r(100)].join(' '));} | |
e(document); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Changes background and foreground colours for all elements on the page */ | |
function r() { | |
return Math.floor(Math.random() * 255); | |
} | |
function lemon() { | |
with(this.style) { | |
color = ['rgb(', [r(), r(), r()].join(','), ')'].join(''); | |
backgroundColor = ['rgb(', [r(), r(), r()].join(','), ')'].join(''); | |
} | |
} | |
function rocks() { | |
Array.prototype.forEach.call(document.all, function(item) { | |
setTimeout(function() { | |
lemon.call(item); | |
}, Math.random() * 100 + 100); | |
}); | |
setTimeout(rocks, Math.random() * 500 + 100); | |
} | |
rocks(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Changes background and foreground colours for all elements on the page */ | |
function r() { return Math.floor(Math.random() * 255); } | |
function fakk(){ this.style.color = ['rgb(',[r(),r(),r()].join(','),')'].join(''), | |
this.style.backgroundColor = ['rgb(',[r(),r(),r()].join(','),')'].join(''); } | |
[].forEach.call(document.all, function(item) { | |
setTimeout(function() {fakk.call(item)}, (Math.random()*500)+100) | |
}); |
tyler200821
commented
Sep 15, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment