Hide Anonymous Plurks

Hides ALL anonymous plurks

  1.  
  2. // ANONYMOUS PLURK REMOVER 0.1
  3. // CodeBastard Redgrave <cbredgrave@gmail.com>
  4. //
  5. // Removes those god damn annoying Anonymous plurks from your timeline
  6. //
  7. // --------------------------------------------------------------------
  8. //
  9. // loosely based on this script, and released on the same license:
  10. //
  11. // Plurk comment hide
  12. // version 0.1 BETA!
  13. // 2010-6-22
  14. // Copyright (c) 2010, Alvin Woon
  15. // Released under the GPL license
  16. // http://www.gnu.org/copyleft/gpl.html
  17. //
  18. // --------------------------------------------------------------------
  19. //
  20. // This is a Greasemonkey user script. To install it, you need
  21. // Greasemonkey 0.3 or later: http://greasemonkey.mozdev.org/
  22. // Then restart Firefox and revisit this script.
  23. // Under Tools, there will be a new menu item to "Install User Script".
  24. // Accept the default configuration and install.
  25. //
  26. // To uninstall, go to Tools/Manage User Scripts,
  27. // select "Unstyle", and click Uninstall.
  28. //
  29. // --------------------------------------------------------------------
  30. //
  31. // ==UserScript==
  32. // @name Hide Anonymous Plurks
  33. // @namespace http://codebastard.com
  34. // @description Hides ALL anonymous plurks
  35. // @include http://plurk.com/*
  36. // @include http://www.plurk.com/*
  37. // @grant none
  38. // @version 0.1
  39. // ==/UserScript==
  40.  
  41. var user = ['Anonymous', 'anonymous'];
  42.  
  43. (function init(){
  44. var j;
  45. for (j in user){
  46. var str = "//a[@href='/" + user[j] + "']";
  47. user[j] = str;
  48. }
  49. var pattern = user.join(" | ");
  50. document.body.addEventListener('DOMNodeInserted', function() {
  51. var findPattern = pattern, i, resultLinks = document.evaluate(findPattern, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
  52. for(i=0; i<resultLinks.snapshotLength; i++){
  53. var wholeplurk = resultLinks.snapshotItem(i).parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
  54. if(wholeplurk.className && wholeplurk.className.indexOf('cboxAnchor') > -1){
  55. wholeplurk.style.display = 'none';
  56. }
  57. }
  58. }, false);
  59. }());
  60.