电影天堂清路猴

电影天堂首页及电影下载页面清除广告,点击磁力链自动可以选择使用百度云盘下载!

  1. // ==UserScript==
  2. // @name 电影天堂清路猴
  3. // @namespace http://tampermonkey.net/
  4. // @version 2018.11.10
  5. // @description 电影天堂首页及电影下载页面清除广告,点击磁力链自动可以选择使用百度云盘下载!
  6. // @author yang
  7. // @match http://www.dytt8.net/*
  8. // @match https://www.dytt8.net/*
  9. // @match http://dytt8.net/*
  10. // @match https://dytt8.net/*
  11. // @match https://pan.baidu.com/disk/home*
  12. // @grant none
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. 'use strict';
  17.  
  18. let domain_name = window.location.hostname;
  19.  
  20. if(domain_name=='pan.baidu.com'){
  21. var url = new URL(window.location.href);
  22. var mag_href = url.searchParams.get("mag_href");
  23.  
  24. if(!mag_href) return;
  25.  
  26. window.onload = function(){
  27. document.querySelector('.tcuLAu .icon-download').parentElement.click();
  28. let timer = setInterval(()=>{
  29. if(document.getElementById('_disk_id_2')){
  30. document.getElementById('_disk_id_2').click();
  31. document.getElementById('share-offline-link').value=mag_href;
  32. clearInterval(timer);
  33. }
  34. },200);
  35.  
  36.  
  37. }
  38.  
  39. return;
  40. }
  41.  
  42. window.onload = function(){
  43. console.log('电影天堂扫地工开车了。。');
  44. //清除第一次点击电影名称时跳转的广告
  45. if(document.querySelector("body > a")){
  46. document.querySelector("body > a").outerHTML = "";
  47. }
  48. //清除广告iframe
  49. let ifs = document.getElementsByTagName('iframe');
  50. for(let i = 0;i<ifs.length;i++){
  51. ifs[i].style.display = 'none';
  52. }
  53. //清除子页面广告
  54. let temp_node = document.getElementById('showXLdiv');
  55. if(temp_node.nextElementSibling) temp_node.nextElementSibling.style.display='none';
  56. if(temp_node.nextElementSibling && temp_node.nextElementSibling.nextElementSibling){
  57. temp_node.nextElementSibling.nextElementSibling.style.display='none';
  58. }
  59.  
  60. //磁力链处理
  61. if(document.querySelector('#Zoom a')){
  62. document.querySelector('#Zoom a').onclick = function(e){
  63. e.preventDefault();
  64. let mag_href = document.querySelector('#Zoom a').href;
  65. if(prompt('是否要使用百度网盘直接下载?',mag_href)){
  66. window.location.href = 'https://pan.baidu.com?mag_href='+mag_href;
  67. }
  68. }
  69. }
  70. };
  71. //右下角广告在页面加载完成后并不是第一时间出现,使用定时器轮询,在广告出现时
  72. //隐藏广告,清除定时器
  73. let timer1 = setInterval(()=>{
  74. let ad_right = document.getElementById('cs_DIV_cscpvrich5041B');
  75. if(!ad_right) return;
  76. if(ad_right.style.display == 'none'){
  77. clearInterval(timer1);
  78. }else{
  79. ad_right.style.display = 'none';
  80. }
  81. },500);
  82. //清除首页首次点击任何位置都会调转的广告
  83. let timer2 = setInterval(()=>{
  84. let index_cover = document.querySelector("body > a");
  85. if(!index_cover) return;
  86. if(index_cover.outerHTML == ''){
  87. clearInterval(timer2);
  88. }else{
  89. index_cover.outerHTML = '';
  90. }
  91. },500);
  92.  
  93.  
  94.  
  95. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址