vBulletin Total Ignore

Remove all mention of ignored people (except thanks)

目前为 2014-05-13 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name vBulletin Total Ignore
  3. // @include */showthread.php*
  4. // @include */showpost.php*
  5. // @include */private.php*
  6. // @include */member.php*
  7. // @exclude
  8. // @version 1.03
  9. // @date 2014-01-27
  10. // @creator Tjololo
  11. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js
  12. // @namespace https://greasyfork.org/users/710
  13. // @description Remove all mention of ignored people (except thanks)
  14. // ==/UserScript==
  15.  
  16. //var plonk = new Array();
  17. var plonk = (GM_getValue("plonk") ? GM_getValue("plonk") : new Array());
  18.  
  19. if (!this.GM_getValue || (this.GM_getValue.toString && this.GM_getValue.toString().indexOf("not supported")>-1)) {
  20. this.GM_getValue=function (key,def) {
  21. return localStorage[key] || def;
  22. };
  23. this.GM_setValue=function (key,value) {
  24. return localStorage[key]=value;
  25. };
  26. this.GM_deleteValue=function (key) {
  27. return localStorage.removeItem(key);
  28. }
  29. }
  30. $('li[class*=postbitignored]').each(function() {
  31. var name = $(this).find(".postbody").find("strong").html();
  32. if ($.inArray(name,plonk) == -1)
  33. plonk.push(name);
  34. GM_setValue("plonk",plonk);
  35. $(this).hide();
  36. console.log("Found "+name);
  37. });
  38.  
  39. $(".bbcode_quote").each(function() {
  40. var name = $(this).find("strong").html();
  41. if ($.inArray(name,plonk) > -1){
  42. console.log("Found quote from "+name);
  43. $(this).html("Quote from "+name+" hidden");
  44. $(this).hide();
  45. }
  46. });
  47.  
  48. /*if (GM_getValue("plonk")){
  49. var oldPlonk = GM_getValue("plonk");
  50. for (var i = 0; i < plonk.length; i ++){
  51. if ($.inArray(plonk[i],oldPlonk) == -1)
  52. oldPlonk.push(plonk[i]);
  53. }
  54. GM_deleteValue("plonk");
  55. GM_setValue("plonk",oldPlonk);
  56. }
  57. else
  58. GM_setValue("plonk",plonk);*/