FC2PPV.live

FC2PPV.live图片修改,种子搜索

  1. // ==UserScript==
  2. // @name FC2PPV.live
  3. // @namespace https://greasyfork.org/zh-CN/scripts/497510-fc2ppv-live/code
  4. // @version 0.2.1
  5. // @description FC2PPV.live图片修改,种子搜索
  6. // @author sp365
  7. // @match https://www.fc2ppv.live/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=fc2ppv.live
  9. // @require https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js
  10. // @grant none
  11. // @license MIT
  12. // ==/UserScript==
  13.  
  14. (function() {
  15.  
  16. function jsleft(obj, str) {
  17. var index = obj.indexOf(str);
  18. obj = obj.substring(0, index);
  19. return obj;
  20. }
  21.  
  22. //JS 取右字符函数
  23. function jsright(obj,str){
  24. var index = obj.indexOf(str);
  25. obj = obj.substring(index + 1,obj.length);
  26. return obj;
  27. }
  28.  
  29. function jsmid(str,b,a){
  30. var bds=b+'(\\S*)'+a;
  31. return str.match(bds)[1];
  32. }
  33.  
  34. //jQuery('.section')[0].remove();
  35. //移除页面最上面的广告
  36. var se=jQuery('.section');
  37. var p=se.length;
  38. console.log(i);
  39. if (p>2){
  40. jQuery('.section')[0].remove();
  41. }
  42. //替换图片
  43. var i;
  44. var id;
  45. var urls =jQuery('figure.image a img');
  46. for (i = 0; i < urls.length; i++) {
  47. var url = urls[i].src;
  48. url=jsright(url, '&file=');
  49. console.log(url);
  50. url=url.replace( 'file=','');
  51. console.log(url);
  52. jQuery('figure.image a img')[i].src=url;
  53.  
  54. //添加磁力链接搜索链接
  55. console.log(i);
  56.  
  57. id=$('figure.image a')[i].href;
  58. console.log(id);
  59. // var str=id;
  60. id=id.replace('20','')
  61. var str = id.match(/\d+/g);
  62. console.log(str[2]);
  63. //https://btsow.motorcycles/search/
  64. //注入搜索链接
  65. jQuery('.media-content')[i].innerHTML= jQuery('.media-content')[i].innerHTML+'<a target="_blank" href=https://btsow.motorcycles/search/'+str[2]+'><p class="ccc">FC2PPV'+str[2]+'</p></a>';
  66. var s=jQuery('.media-content')[i];
  67. //jQuery('figure.image a')[i].innerHTML= jQuery('figure.image a')[i].innerHTML+'<a target="_blank" href=https://btsow.motorcycles/search/'+str[2]+'><p class="ccc">FC2PPV'+str[2]+'</p></a>';
  68. //console.log(s);
  69.  
  70. }
  71. })();