Sleazy Fork is available in English.

sex169论坛广告去除 (sex 169 ads remove function)

used for http://bbs.sex169.org/

  1. // ==UserScript==
  2. // @name sex169论坛广告去除 (sex 169 ads remove function)
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1.1
  5. // @description used for http://bbs.sex169.org/
  6. // @author You
  7. // @match http://*/*
  8. // @license MIT
  9. // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. let rmList = ['fastlg cl','wp a2_h','a_2mu','a_pb'];
  16. let rmIDList = ['hd', 'toptb'];
  17.  
  18. rmIDList.forEach(rmFunction2);
  19. rmList.forEach(rmFunction);
  20.  
  21. if(document.getElementsByClassName('plc').length > 0){
  22. let plcNode = document.getElementsByClassName('plc')[1];
  23. plcNode.parentNode.removeChild(plcNode);
  24. }
  25. let stickthreadIds = [];
  26. if(document.querySelectorAll('[id^=stickthread]').length > 0){
  27. document.querySelectorAll('[id^=stickthread]').forEach(rmFunction3)
  28. }
  29. if(stickthreadIds.length > 0){
  30. //console.log(stickthreadIds);
  31. stickthreadIds.forEach(rmFunction2);
  32. }
  33.  
  34. function rmFunction(item, index) {
  35. if(document.getElementsByClassName(item).length > 0){
  36. document.getElementsByClassName(item)[0].parentNode.removeChild(document.getElementsByClassName(item)[0]);
  37. }
  38. }
  39.  
  40. function rmFunction2(item, index) {
  41. if(document.getElementById(item)!=null){
  42. document.getElementById(item).parentNode.removeChild(document.getElementById(item));
  43. }
  44. }
  45.  
  46. function rmFunction3(item, index) {
  47. stickthreadIds.push(document.querySelectorAll('[id^=stickthread]')[index].id);
  48. }
  49. // Your code here...
  50. })();