Advertisement
SPennLUE

ETI Mark Logout Links

Jan 8th, 2013
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name Mark Links v3
  3. // @namespace original version by headbanger (I think)
  4. // @description Styles logout links so you dont accidentally click one
  5. // @include http://*.endoftheinter.net/showmessages.php*
  6. // @include https://*.endoftheinter.net/showmessages.php*
  7. // @include http://*.endoftheinter.net/message.php*
  8. // @include https://*.endoftheinter.net/message.php*
  9. // @include http://endoftheinter.net/showmessages.php*
  10. // @include https://endoftheinter.net/showmessages.php*
  11. // @include http://endoftheinter.net/linkme.php*
  12. // @include https://endoftheinter.net/linkme.php*
  13. // @include http://links.endoftheinter.net/linkme.php*
  14. // @include https://links.endoftheinter.net/linkme.php*
  15. // @include http://*boards.*.endoftheinter.net/showtopics.php?board=*
  16. // @include https://*boards.*.endoftheinter.net/showtopics.php?board=*
  17. // @include http://*boards.*.endoftheinter.net/showmessages.php*
  18. // @include https://*boards.*.endoftheinter.net/showmessages.php*
  19. // @include http://archives.*.endoftheinter.net/*
  20. // @include https://archives.*.endoftheinter.net/*
  21. // @include http://boards.clouds.endoftheinter.net/*
  22. // @include https://boards.clouds.endoftheinter.net/*
  23. // @include http://archives.clouds.endoftheinter.net/*
  24. // @include https://archives.clouds.endoftheinter.net/*
  25. // ==/UserScript==
  26.  
  27. var alllinks = document.getElementsByTagName("a");
  28. for (var i = 1; i < alllinks.length; i++) {
  29.  
  30.     var thislink = alllinks[i];
  31.  
  32.     function markLink() {
  33.         thislink.style.backgroundColor = "#EE8888";
  34.         thislink.style.color = "#000000";
  35.         thislink.title = "This link will log you out!";
  36.     }
  37.  
  38.     if (thislink.href.indexOf("endoftheinter.net/logout.php") != -1 && thislink.innerHTML != "Logout") {
  39.         markLink();
  40.     } else if (thislink.href.indexOf("fivethirstyeight.com") != -1 && thislink.innerHTML != "fivethirstyeight.com") {
  41.         markLink();
  42.     } else if (thislink.href.indexOf("arizonatimes.us") != -1 && thislink.innerHTML != "arizonatimes.us") {
  43.         markLink();
  44.     }
  45.  
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement