禁止小草检测abp及其他广告清理

小草站会检测abp,并且贴子内容的广告非常不好清除。\r\n比如 第六天魔王 发的贴子,内容中非常多的广告。\r\n可能随时会更新代码。

  1. // ==UserScript==
  2. // @name 禁止小草检测abp及其他广告清理
  3. // @namespace Violentmonkey Scripts
  4. // @include http*://*t66y.com/*
  5. // @include http*://*xn--zbsq6i.tk/*
  6. // @include http*://*xn--r8vr95c.ml/*
  7. // @include http*://其他域名自行添加,中文需要转换成以上格式/*
  8. // @grant none
  9. // @version 0.0.1.20181220145615
  10. // @description 小草站会检测abp,并且贴子内容的广告非常不好清除。\r\n比如 第六天魔王 发的贴子,内容中非常多的广告。\r\n可能随时会更新代码。
  11. // ==/UserScript==
  12. spinit = function(){};
  13. (function() {
  14. readS1= null;
  15. readS= null;
  16. r1eadS = null;
  17. adhtml = null;
  18. $(".tpc_content iframe").remove();
  19. var _keywords = ["【影片名稱】","種子連結","MP4"];
  20. var _keywords_in = false;
  21. var ttt_html = $(".tpc_content").eq(0).html();
  22. $.each(_keywords,function(i, _n){
  23. var ttt = ttt_html.split(_n);
  24. if( typeof(ttt[1]) != "undefined" && !_keywords_in){
  25. _keywords_in = true;
  26. ttt[0] = "";
  27. $(".tpc_content").eq(0).html(ttt.join(_n).replace(/(<br\s?\/?>)+/gi, '$1').replace(/(<br\s?\/?>\s?&nbsp;)+/gi, '$1'));
  28. }
  29. });
  30. //$(".tpc_content").html().replace( /([a-z])+/g,'qqq' );
  31. /*
  32. if( _keywords_in){
  33. //无相应关键词
  34. $(".tpc_content:eq(0) a[href^='http://www.viidii.info']").each(function(i){
  35. //console.log($(this).attr("href"));
  36. if( $(this).text().indexOf("http://") == -1){
  37. //$(this).remove();
  38. }
  39. });
  40. $(".tpc_content:eq(0) img[data-link]").each(function(i){
  41. console.log($(this).attr("data-link"),this.width,this.height);
  42. if (!this.complete || (typeof this.naturalWidth == "undefined" && this.naturalWidth == 0) || !this.src) {
  43. console.log('删除',this.complete);
  44. //$(this).remove();
  45. }
  46. });
  47. }
  48. */
  49.  
  50. $(".tpc_content:eq(0) a").each(function(i){
  51. if( $(this).text().indexOf("以下內容被隱藏") != -1){
  52. $(this).remove();
  53. }
  54. if( $(this).text().indexOf("點擊這里打開新視窗") != -1){
  55. $(this).remove();
  56. }
  57. });
  58. // $(".tpc_content").eq(0).html($(".tpc_content").eq(0).replace(/(<br\s?\/?>\|)+/gi, '$1')/gi, '$1'));
  59. })();