Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name 4chan 404 listener
- // @namespace 2-hi.me
- // @author team!kittensORw
- // @description listens for sneaky 404s on 4chan
- // @include http*://*4chan.org/*/res/*
- // @version 1
- // ==/UserScript==
- var deadWin = document.createElement("div");
- deadWin.id = "deadWin";
- deadWin.setAttribute("align", "left");
- deadWin.style.top = "50px";
- deadWin.style.title = "close";
- deadWin.style.width = "200px";
- deadWin.style.left = "50%";
- deadWin.style.marginLeft = "-100px";
- deadWin.style.height = "70px";
- deadWin.style.position = "fixed";
- deadWin.style.border = "1px solid";
- deadWin.style.borderRadius = "15px";
- deadWin.style.opacity = "0.6";
- deadWin.style.display = "none";
- deadWin.style.cursor = "pointer";
- deadWin.style.background = "#980000";
- deadWin.innerHTML = '<center><h1 style="color:#ffffff">404</h1></center>';
- document.body.appendChild(deadWin);
- var timerVar=setInterval(function(){checkTimer()},20000);
- function checkTimer(){
- GM_xmlhttpRequest({
- method: "GET",
- url: document.URL,
- onload: function(response) {
- if (response.status == 404){
- deadWin.style.display = "";
- clearInterval(timerVar);
- var xbattleVar=setInterval(function(){battleX()},5000);
- function battleX(){
- document.title = "404 :c";
- }}}});}
- function hideLisn(){
- deadWin.style.display = "none";}
- document.getElementById("deadWin").addEventListener('click',hideLisn,false);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement