Advertisement
Kinu-chan

Untitled

Jul 19th, 2013
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        4chan 404 listener
  3. // @namespace   2-hi.me
  4. // @author      team!kittensORw
  5. // @description listens for sneaky 404s on 4chan
  6. // @include     http*://*4chan.org/*/res/*
  7. // @version     1
  8. // ==/UserScript==
  9. var deadWin = document.createElement("div");
  10. deadWin.id = "deadWin";      
  11. deadWin.setAttribute("align", "left");        
  12. deadWin.style.top = "50px";
  13. deadWin.style.title = "close";
  14. deadWin.style.width = "200px";
  15. deadWin.style.left = "50%";
  16. deadWin.style.marginLeft = "-100px";
  17. deadWin.style.height = "70px";
  18. deadWin.style.position = "fixed";
  19. deadWin.style.border = "1px solid";
  20. deadWin.style.borderRadius = "15px";
  21. deadWin.style.opacity = "0.6";
  22. deadWin.style.display = "none";
  23. deadWin.style.cursor = "pointer";
  24. deadWin.style.background = "#980000";
  25. deadWin.innerHTML = '<center><h1 style="color:#ffffff">404</h1></center>';
  26. document.body.appendChild(deadWin);
  27. var timerVar=setInterval(function(){checkTimer()},20000);
  28. function checkTimer(){
  29. GM_xmlhttpRequest({
  30. method: "GET",
  31. url: document.URL,
  32. onload: function(response) {
  33. if (response.status == 404){
  34. deadWin.style.display = "";
  35. clearInterval(timerVar);
  36. var xbattleVar=setInterval(function(){battleX()},5000);
  37. function battleX(){
  38. document.title = "404 :c";
  39. }}}});}
  40. function hideLisn(){
  41. deadWin.style.display = "none";}
  42. document.getElementById("deadWin").addEventListener('click',hideLisn,false);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement