New Userscript

try to take over the world!

当前为 2019-12-19 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name New Userscript
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description try to take over the world!
  6. // @author You
  7. // @match http://m.pufei.net/*
  8. // @grant none
  9. // @require http://libs.baidu.com/jquery/2.0.0/jquery.min.js
  10. // ==/UserScript==
  11. function find_element_by_xpath(STR_XPATH) {
  12. var xresult = document.evaluate(STR_XPATH, document, null, XPathResult.ANY_TYPE, null);
  13. var xnodes = [];
  14. var xres;
  15. while (xres = xresult.iterateNext()) {
  16. xnodes.push(xres);
  17. }
  18. return xnodes;
  19. }
  20. (function() {
  21. 'use strict';
  22. //移出广告
  23. function removeAd(){
  24. //#tcFhKHfzFa
  25. //document.querySelector("#tcFhKHfz1_1")
  26. ////*[@id="tcFhKHfz1_1"]
  27. //#ssBPYfcP1_1 body > div.___qnd > div:nth-child(3) body > iframe
  28. ////*[@id="WHzszYPkFa"]//*[@id="kob4en6ck72"]body > iframe
  29. //<img width="100%" src="http://res.img.220012.net/images/2019/11/23/02/48d8f7cde5.jpg/0" style="display: inline-block;">
  30. $("body > iframe:nth-child(9)").remove();
  31. //$("body > div:nth-child(6)").remove();
  32.  
  33. //#manga
  34. let a=find_element_by_xpath("//*[@id=\"tcFhKHfz1_1\"]");
  35. console.log(a);
  36. a.innerHTML="";
  37. }
  38. function addAllManHua(){
  39. $("#manga>img").remove();
  40. for (let i=1;i<window._cuRs.length;i++){
  41. $("#manga").append("<img width=\"100%\" src=\"http://res.img.220012.net/"+window._cuRs[i]+"\" style=\"display: inline-block;\">")
  42. }
  43. }
  44. removeAd();
  45. addAllManHua()
  46. console.log("sssssssssss",window._cuRs)
  47.  
  48. })();