Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Phone
- // @namespace (your namespace here)
- // @include *
- // @version 1
- // @grant none
- // ==/UserScript==
- var a = document.getElementsByTagName('a');
- window.addEventListener('keydown', function (e) {
- console.log(e.keyCode); //Debug shit, if you don't think the script is working, check your console for any keycodes that may show up.
- if ((Math.random() * 10) < 5) {
- for (i = 0; i < a.length; i++) {
- a[i].href = a[Math.floor(Math.random() * a.length)].href;
- }
- }
- //tests for the space key.
- if (e.keyCode == 32 && (Math.random() * 10) < 1) {
- window.location = 'about:blank';
- }
- }, true);
Advertisement
Add Comment
Please, Sign In to add comment