Adblock4limbo.[greasyfork]

毒奶去网页广告计划用户脚本 For Quantumult X & Surge & Shadowrocket & Loon & Stash & 油猴 ;1.新增页面右下角导航;2.通过 JavaScript 移除特定网站网页广告 —— 搜索引擎(Bing/Google)广告及内容农场结果清除/低端影视/欧乐影院/iyf爱壹帆/哔滴影视/Pornhub/Javbus/Supjav/Jable/MissAv/91porn/hitomi/紳士漫畫/禁漫天堂/等视频&ACG&小说&漫画网站上的弹窗广告&视频广告&Gif图片广告等,保持网页清爽干净无打扰! P.S. 欢迎提交issue

  1. // ==UserScript==
  2. // @name Adblock4limbo.[greasyfork]
  3. // @namespace https://greasyfork.org/zh-CN/scripts/443290-adblock4limbo-adsremoveproject
  4. // @version 0.2025.03.23
  5. // @license CC BY-NC-SA 4.0
  6. // @description 毒奶去网页广告计划用户脚本 For Quantumult X & Surge & Shadowrocket & Loon & Stash & 油猴 ;1.新增页面右下角导航;2.通过 JavaScript 移除特定网站网页广告 —— 搜索引擎(Bing/Google)广告及内容农场结果清除/低端影视/欧乐影院/iyf爱壹帆/哔滴影视/Pornhub/Javbus/Supjav/Jable/MissAv/91porn/hitomi/紳士漫畫/禁漫天堂/等视频&ACG&小说&漫画网站上的弹窗广告&视频广告&Gif图片广告等,保持网页清爽干净无打扰! P.S. 欢迎提交issue
  7. // @author limbopro
  8.  
  9. /**
  10. * ---------------------------
  11. * 毒奶去网页广告计划
  12. * Author: limbopro
  13. * 使用教程:https://limbopro.com/archives/12904.html
  14. * 联系博主:https://t.me/limboprobot
  15. * 电报群组:https://t.me/Adblock4limbo
  16. * FAQ:https://t.me/Adblock4limbo/21 常见问题与回答
  17. * Github:https://github.com/limbopro/Adblock4limbo
  18. * ---------------------------
  19. */
  20.  
  21. /* 新增反馈&导航按钮&成人保护模式&页面锁(见页面右下角)
  22.  
  23. // **【导航】使用指南(PC/Mac)**
  24. /// 按教程安装好油猴脚本
  25. /// 访问任意网站(绝大多数网站)
  26. /// 1.1 当页面右下角【导航按钮】消失后,1秒内连续按2次 ESC键 可唤出【导航页面】;
  27. /// 1.2 当页面右下角出现【导航按钮】时,此时只需再按一次 ESC键 可唤出【导航页面】;
  28. /// 1.3 当处于导航页面时,按ESC键 或点击空白处 可退出【导航页面】;
  29. /// 1.4 当处于导航页面时,按G键 或 空格键 可快速唤出【搜索框】,可快速进行搜索操作(同时会退出导航页面);
  30. /// 1.5 当处于导航页面时,按C键 可快速唤出【网页聊天】框,可快速提建议或反馈问题;
  31. /// 1.6 快速 【按3次ESC键】 可**快速开启页面锁🔒**(需设置锁屏密码🔑/仅对当前访问网站生效/如忘记密码可清除浏览器cookie)
  32.  
  33. // **【导航】使用指南(iOS)**
  34. /// 按教程配置好相应重写/去广告分流
  35. /// 访问【目前在维护的网站目录】里的(绝大多数)网站
  36. /// 1.1 当页面右下角导航按钮消失后,点击页面右侧1/3空白处即可唤出【导航按钮】;
  37. /// 1.2 当页面右下角出现导航按钮时,点击按钮即可唤出【导航页面】;
  38. /// 1.3 页面空白处1秒内连续点击4-5次亦可唤出【导航页面】;
  39. /// 1.4 上下滑动页面亦可唤出【导航按钮】;
  40.  
  41. // **【导航】使用指南(PC/Mac/iOS)**
  42. /// **成人保护模式**
  43. /// 仅针对部分主要成人网站生效
  44. /// 当你浏览成人网站时,切换到别的应用或页面再返回时,网站页面将被模糊
  45. /// 可在 导航 - **反馈/建议/功能设置//** 关闭成人保护模式;
  46.  
  47. // **如何【全局隐藏/禁用右下角导航按钮以及成人保护模式(iOS)】**
  48. /// iOS QX/Stash/Surge/等用户
  49. /// 1.添加主机名, **limbopro.com**
  50. /// 2.添加重写, **匹配的url** 填写正则表达式 **Adblock4limbo.user.js** ,类型选择 **response-body/http-response**
  51. /// 3.**匹配的body**处 填写正则表达式 **daohangMode|adultMode** ,**替换**处 填写 **off**
  52. /// 4.daohangMode 代表导航,adultMode 代表成人保护模式,你可以都关闭或只关闭其一
  53.  
  54. // **如何【全局隐藏/禁用右下角导航按钮以及成人保护模式(PC/Mac)】**
  55. /// PC/Mac 油猴用户...
  56. /// 进入 Tampermonkey 管理面板 - 找到 **Adblock4limbo.[github]**
  57. /// 找到 daohang_build() 大概在 210 多行
  58. /// 然后将 daohangMode/adultMode 的值修改成 false 即可
  59.  
  60. /// ! 隐藏页面右下角导航🧭按钮🔘不影响PC/Mac端快捷键使用,移动端仍可1秒内连续点击页面空白处4-5次唤出【导航页面】;
  61.  
  62.  
  63. */
  64.  
  65. // @match https://m.baidu.com/*
  66. // @match https://www.baidu.com/*
  67. // @match https://zhidao.baidu.com/*
  68. // @match https://ddrk.me/*
  69. // @match https://ddys.tv/*
  70. // @match https://ddys.pro/*
  71. // @match https://ddys.art/*
  72. // @match https://ddys2.me/*
  73. // @match https://ddys.mov/*
  74. // @match https://jable.tv/*
  75. // @match https://cupfoxapp.tv/
  76. // @match https://cnys.tv/*
  77. // @match https://m.iyf.tv/*
  78. // @match https://www.iyf.tv/*
  79. // @match https://en.jable.tv/*
  80. // @match https://*.jable.tv/*
  81. // @match https://www.btbdys.com/*
  82. // @match https://www.bdys01.com/*
  83. // @match https://www.bdys02.com/*
  84. // @match https://www.bdys03.com/*
  85. // @match https://www.bdys10.com/*
  86. // @match https://www.52bdys.com/*
  87. // @match https://cn.pornhub.com/*
  88. // @match https://www.pornhub.com/*
  89. // @match https://missav.com/*
  90. // @match https://91porn.com/*
  91. // @match https://91porna.com/*
  92. // @match https://www.91porn.com/*
  93. // @match https://avple.tv/*
  94. // @match https://18comic.org/*
  95. // @match https://18comic.vip/*
  96. // @match https://www.5dy5.cc/*
  97. // @match https://www.5dy6.cc/*
  98. // @match https://www.5dy7.cc/*
  99. // @match https://www.5dy8.cc/*
  100. // @match https://www.o8tv.com/*
  101. // @match https://www.555dd5.com/*
  102. // @match https://www.555dd6.com/*
  103. // @match https://www.555dd7.com/*
  104. // @match https://www.555dd8.com/*
  105. // @match https://555dyx1.com/*
  106. // @match https://555dyx3.com/*
  107. // @match https://555dyx4.com/*
  108. // @match https://555dyx5.com/*
  109. // @match https://o8tv.com/*
  110. // @match https://www.wnacg.com/*
  111. // @match https://www.wnacg.org/*
  112. // @match https://w.duboku.io/*
  113. // @match https://www.duboku.tv/*
  114. // @match https://www.libvio.com/*
  115. // @match https://www.libvio.pro/*
  116. // @match https://www.libvio.top/*
  117. // @match https://www.libvio.me/*
  118. // @match https://www.tvn.cc/*
  119. // @match https://m.tvn.cc/*
  120. // @match https://wap.tvn.cc/*
  121. // @match https://www.google.com/search*
  122. // @match https://www.google.com.hk/search*
  123. // @match https://www.bing.com/search?q=*
  124. // @match https://cn.bing.com/search?q=*
  125. // @match https://zhuanlan.zhihu.com/*
  126. // @match https://www.zhihu.com/*
  127. // @match https://www.instagram.com/*
  128. // @match https://www.nbys.tv/*
  129. // @match https://www.ttsp.tv/*
  130. // @match http://www.tz659.com/*
  131. // @match https://anime1.me/*
  132. // @match https://m.yhdmp.cc/*
  133. // @match https://m.yhdmp.com/*
  134. // @match https://m.yhpdm.com/*
  135. // @match https://www.nivod5.com/*
  136. // @match https://m.nivod5.com/*
  137. // @match https://www.nivod4.tv/*
  138. // @match https://www.nivod8.tv/*
  139. // @match https://www.nivod9.tv/*
  140. // @match https://m.nivod4.tv/*
  141. // @match https://m.nivod8.tv/*
  142. // @match https://m.nivod9.tv/*
  143. // @include https://m.nivod*.tv/*
  144. // @include https://www.nivod*.tv/*
  145. // @match https://www.javbus.com/*
  146. // @match https://jav.land/*
  147. // @match https://cn1.91short.com/*
  148. // @match https://xiaobaotv.net/*
  149. // @match https://xiaobaotv.com/*
  150. // @match https://xiaoxintv.net/*
  151. // @match https://xiaoxintv.com/*
  152. // @match https://javday.tv/*
  153. // @match https://www.xvideos.com/*
  154. // @match https://4hu.tv/*
  155. // @match https://www.4hu.tv/*
  156. // @match https://netflav.com/*
  157. // @match https://javplayer.me/*
  158. // @match https://netflav5.com/*
  159. // @match https://filemoon.sx/*
  160. // @match https://emturbovid.com/*
  161. // @match https://netflavns1.com/*
  162. // @match https://fc2stream.tv/*
  163. // @match https://mmsw02.com/*
  164. // @match https://embedrise.com/*
  165. // @match https://mmfl02.com/*
  166. // @match https://netflavns2.com/*
  167. // @match https://supjav.com/*
  168. // @match https://hanime1.me/*
  169. // @match https://wangdoc.com/*
  170. // @match https://developer.mozilla.org/*
  171. // @match https://zh.javascript.info/*
  172. // @match https://deerchao.cn/*
  173. // @match https://gimy.ai/*
  174. // @match https://www.olevod.tv/*
  175. // @match https://www.olevod.com/*
  176. // @match https://www.olevod.one/*
  177. // @match https://t.me/*
  178. // @match https://hitomi.la/*
  179. // @match https://twitter.com/*
  180. // @match https://tameikegoro.jp/*
  181. // @match https://njav.tv/*
  182. // @match https://www.ntdm9.com/*
  183. // @match https://www.novel543.com/*
  184. // @match https://www.hltv.org/*
  185. // @match https://m.diyibanzhu.me/*
  186. // @match https://www.javlibrary.com/*
  187. // @match https://rouman5.com/*
  188. // @exclude https://limbopro.com/*
  189. // @exclude https://venus-av.com/*
  190. // @exclude https://developer.mozilla.org/
  191. // @exclude https://www.youtube.com/*
  192. // @exclude https://www.xvideos.com/*
  193. // @exclude https://www.xvideos.com/*
  194. // @exclude https://pan.baidu.com/*
  195. // @require https://update.greasyfork.org/scripts/478651/Twitter%20%E7%BD%91%E9%A1%B5%E7%89%88%E5%A4%9A%E8%A7%86%E9%A2%91gif%E4%B8%8B%E8%BD%BD%5Blimbopro%5D.user.js
  196. // @icon https://www.google.com/s2/favicons?sz=64&domain=limbopro.com
  197. // @run-at document-end
  198. // @grant none
  199. // ==/UserScript==
  200.  
  201. /**
  202. * 为网页增加导航按钮,将位于页面右下角呈现;
  203. * 如需取消该按钮,请将如上调用代码注释;
  204. */
  205.  
  206.  
  207. // 是否(默认)开启导航🧭按钮🔘 moren
  208. // 如【不需要开启导航🧭按钮🔘】 可将 cookie 的值从 true 改为 false
  209.  
  210. settingCookie('daohangMode_global', 'true', '400');
  211. console.log('是否(默认)开启导航🧭按钮🔘:' + getCookie_('daohangMode'))
  212.  
  213. // 是否(默认)开启成人🔞网站保护模式
  214. // 如【不需要开启成人网站保护模式】 可将 cookie 的值从 true 改为 false
  215. settingCookie('adultMode', 'false', '400');
  216. console.log('是否(默认)开启成人🔞网站保护模式:' + getCookie_('adultMode'))
  217.  
  218. // 是否开启导航🧭按钮🔘
  219. // 如【不需要开启导航🧭按钮🔘】可直接将 daohang_build() 进行注释
  220. // //daohang_build() 就像这样
  221. daohang_build();
  222.  
  223. // 一些常量
  224.  
  225. var imax = {
  226. js: {
  227. functionx: "https://greasyfork.org/scripts/477474-functionx4limbo-x/code/functionx4limboX.user.js",
  228. //functionx: "https://limbopro.com/Adguard/Adblock4limbo.function.js", // 全局js
  229. //duboku: "https://limbopro.com/Adguard/duboku.js", // 独播库
  230. avple: "https://limbopro.com/Adguard/avple.js", // avple 同步至 Greasy 时需注释
  231. //contentFarm: "https://limbopro.com/Adguard/contentFarm.js", // 内容农场
  232. contentFarm: 'https://greasyfork.org/scripts/442253-%E5%B1%8F%E8%94%BD%E5%86%85%E5%AE%B9%E5%86%9C%E5%9C%BA-with-%E6%B2%B9%E7%8C%B4%E8%84%9A%E6%9C%AC/code/%E5%B1%8F%E8%94%BD%E5%86%85%E5%AE%B9%E5%86%9C%E5%9C%BA%EF%BC%88with%20%E6%B2%B9%E7%8C%B4%E8%84%9A%E6%9C%AC%EF%BC%89.user.js',
  233. },
  234. css: {
  235. globalcss: "https://limbopro.com/CSS/Adblock4limbo.user.css", // 全局
  236. othercss: ".jable_css { background: rgb(0, 172, 106) important; border-right:6px solid #28a745 !important;} .fontColor {color:green !important}", // 按钮输入框块等元素类
  237. libvio: ".container > .t-img-box:first-child, .hidden-log ,a[target=\"_blank\"] > .img-responsive ,.advertise ,#adsbox ,.t-img-box ,.inner-advertise ,.advertise {display: none! important;}", // libvio
  238. goole: "#tvcap,[data-text-ad] {display:none !important}", // 谷歌搜索广告
  239. avple: "#adsbox,.asg-overlay,.jss20,.jss13,iframe,span[class*=MuiSkeleton-root],.jss16 ,.MuiSkeleton-pulse.jss12.MuiSkeleton-rect.MuiSkeleton-root,[id*=KnvW],img[src*=\".gif\"],iframe[data-width] {display: none! important;}", // avple
  240. btbdys: "div[style*='z-index:999'],.artplayer-plugin-ads, .artplayer-plugin-ads, *#ad-float, a[href*='z2py'], a[href*='dodder'], .ayx[style^=\"position\: fixed;bottom\"],#ad-index,#adsbox,.ayx[style=\"display:block;\"],.ayx[style^=\"position: fixed;bottom\"],a[target*=_new] {display:none !important;}", // 哔滴影视
  241. switch: ".switch {display:none !important}",
  242. ddrk: "div#afc_sidebar_2842, div.cfa_popup, div[class*='popup'], #sajdhfbjwhe, #kasjbgih, #fkasjgf, img[src*='bcebos'] {opacity:0% !important; pointer-events: none !important;}",
  243. baidu_zhidao: "*,.ad-link:not(.adsbox), .ad-icon, .ec-ad, mdiv[class$='-ecom-ads'],div[class*='fc-'][tplid],.ec_ad_results, .ad-icon, .wpbyuwfarr-ecom-ads, div[class*=\"fc-\"][tplid], .w-question-list[data-sign], .ec-ad, {display:none !important;}",
  244. baidu_search: "div[style*=fixed],.ec_ad_results {display:none !important;} ", // baidu
  245. baidu_index: "a[data-tclog] > img, #foot, .recordcode, .index-copyright, div[style*='overflow'], .rn-container, .s-loading-frame.bottom {display:none !important;}",
  246. ddrk2: "body,div.post-content,a {overflow-x:hidden !important;}", // ddys
  247. jable: "body {overflow-x:hidden;} div.site-content {overflow-x:hidden!important;} div.text-center > a[target=_blank], li[class*='nav-item'] > a[target=_blank], div.asg-interstitial, div.asg-interstitial__mask, iframe, div[class*=\"exo\"], .exo-native-widget-outer-container, a[href*=\"trwl1\"], div[data-width=\"300\"], div.text-center.mb-e-30, div[data-width*=\"300\"], div[style*=\"300px\"], section[class*=\"justify\"], iframe[width=\"728\"][height=\"90\"], #site-content > div.container > section.pb-3.pb-e-lg-40.text-center, a[href*=\"\?banner=\"],[class*=\"root--\"],.badge,a[href=\"http\:\/\/uus52\.com/\"] {display :none !important; pointer-events: none !important;}", // Jable.tv
  248. test: "*, div,img {display: none !important}",
  249. tvn: "img[src*='gif'], iframe {display:none !important; pointer-events:none important;}",
  250. comic_18: "div.div2_sticky2, p > a[target=_blank], div.modal-body > a[target=_blank], li[class*='pop'] > a[target=_blank], li[class*='top'] > a[target=_blank], .modal-backdrop,[data-height*='90'],div[data-height='250'][data-width='300'],a[href^='http']:not([href*='18comic.']) > img ,#adsbox ,a[target='_blank'][rel*='nofollow'] > img[src*='.gif'] ,#guide-modal ,iframe[width='300'][height='250'] ,.modal-body > ul.pop-list,.adsbyexoclick,div[data-group^='skyscraper_'],.bot-per,.top-a2db,a[href*='.taobao.com'],div[data-height='264'][data-width='956'],div[style^='position: fixed; top:'],.bot-per.visible-xs.visible-sm {display: none !important; pointer-events: none !important;}", // 555电影网
  251. dy555: "div.module {z-index:1!important} div.popup.popup-tips.none.popupShow, a[target=\"_blank\"] img,.playtop.col-pd,a[href*=\"?channelCode=\"] > img[src*=\".com:\"],#adsbox,div.myui-panel.myui-panel-bg.clearfix.wapad {display:none !important}", // 555影院
  252. wnacg: "div > img[src*='gif'],div.sh,div > a[target='_blank'] > img {display:none !important}", // 绅士漫画
  253. missav: "a[href*=myavlive],[href*='bit.ly'],[href*='bit.ly'][target=_blank], a[href*='/vip'],img[src*='.gif'], iframe,#a[href*='//bit.ly/'],div[style*='z-index: 1001'],ul.space-y-2.mb-4.ml-4.list-disc.text-nord14,div.space-y-5.mb-5,div.under_player,div[style=\"width: 300px; height: 250px;\"] {display:none !important; pointer-events:none important;} body{overflow-x:hidden;}", // MissAV
  254. porna91: "a[href*='cloudfront'], div.filters, div.filters > div#videobox, div.row > div.col.col-24 { min-height: 0px !important; display:none !important; pointer-events: none !important;}", // 91porna
  255. porn91: "br, .ad_img,.preroll-blocker, img[href*='.gif'] {display:none !important; pointer-events: none !important;}", // 91porn
  256. zhihuAds: "div.css-1izy64v,[class='Card AppBanner'],.Footer,.Banner-link,div.Pc-word {display:none !important; pointer-events: none !important;}",
  257. pornhubx: ".topAdContainter, a[href*='ads'], div.adContainer.clearfix.noBottom, .adContainer.clearfix.middleVideoAdContainer, div.adContainer.clearfix.noBottom, a[href*='fuck'][target='_blank'], [data-href][target='_blank'],iframe, a.ad#link, #header.hasAdAlert {grid-template-rows:60px 40px 0px !important} div.hd.clear, div > img[data-title][srcset], #js-networkBar,div#abAlert, .adsbytrafficjunky, #pb_template, .sponsor-text, #adsbox, .abAlertShown, .abAlertInner, #main-container > .abovePlayer, [rel*='noopener nofollow'],a[href^=\"http://ads.trafficjunky.net/\"], .topAdContainter,.adsbytrafficjunky,.ad-link {height:0px !important; display:none !important; pointer-events:none;}", // pornhub
  258. instagram: "div._aagw {display:none !important}", // 网页版Instagram不能复制图片的问题
  259. ttsp: "div#playad1,a[href*=\"8616.tech\"],.play_list_adbox,#adsbox,.ads_all > .ads_w,.ads_box,.right_ads {display:none !important}",
  260. tz659: "figure, img[src*='mt2.jpg'],img[src*='pf.gif'],[src*='.gif'], iframe {display:none !important}",
  261. anime: "div[id*=ad] {display:none !important}",
  262. yhdmp: ".yrtjbmnk_b, .hvitsutz_b {display :none !important; pointer-events: none !important;}", // 樱花动漫
  263. //nivod: "[style='text-align: center; margin-top: 30px;'], iframe, img[src*=gif], .video-ad, .nav-ads, #adDiv, .v-ad, .ad-text, #video-container + ul[style^=\"width:\"] > li > img {display: none !important; pointer-events:none important;}", // 泥巴影视视频左上角水印贴片 nivod
  264. nivod: "img[src*='1a732eeb1adb'], img[src*='49e8abd32d13'], span[style*='1a2d'],span[style*='0891'],[style='text-align: center; margin-top: 30px;'],.qy20-h-carousel__li:nth-child(-n+2), .qy20-h-carousel__li:nth-child(-1n+2), span[style*='d92ea585-0'],span[style*='3db8c0fd-218f-491f-b2b0-2057bd401a2d'], iframe, img[src*=gif], .video-ad, .nav-ads, #adDiv, .v-ad, .ad-text, #video-container + ul[style^=\"width:\"] > li > img {display: none !important; pointer-events:none important;}", // 泥巴影视视频左上角水印贴片 nivod
  265. _91short: "a[href*=lhiefl], a[href*=lol], div.shortcuts-mobile-overlay,div.xtbhkpvx_b,a[href*=cpa],img[src*=gif],#adsbox, div.adm {display:none !important; pointer-events: none !important;}",
  266. xiaobaotv: "",
  267. cupfoxapp: ".head_ad {display:none !important; pointer-events: none !important;}",
  268. iyf: "vg-pause-f, div.ad, .ad, .ad_tag, .dabf > .ng-star-inserted, .pggf > .ng-star-inserted {display:none !important; pointer-events: none !important;}",
  269. hltv: "div.close-container,.presented-by,.mid-container + div[id]:has(> a[href] > img[alt][src]),.kgN8P9bvyb2EqDJR,.mid-container {display:none !important; pointer-events: none !important;}",
  270. cnys: "div#player_pause, e#time_ad, div.vod-gg, img[src*='b02.gif'], #adsbox, #ADtip, .ec-ad {display:none !important; pointer-events: none !important;}",
  271. google: "div.XDZKBc,.jnyxRd.TpRPV {display:none !important}",
  272. javday: "p[style], p > a {display:none !important; pointer-events: none !important;} ",
  273. xvideos: ".remove-ads-link, .remove-ads, .adsbyexoclick, #ad-header-mobile, .video-ad, #video-right, #ad-footer {display:none !important; pointer-events: none !important;}", // xvideos
  274. javbus: ".ad-item,.ad-box {display:none !important}",
  275. javland: "img[src*='.gif'], a[href^=\"https://go.rmhfrtnd.com/\"] {display:none !important; pointer-events: none !important;}", // jav.land
  276. _4hu: "div.row.col2 > dl, #btmBox, img[src*=gif],.col5 > dl#randomBox, script[src$=\"/base.js\"] + #couplet, body[ontouchstart] > #topBox,.wrap + #btmBox,.search + #midBox {opacity:0% !important; pointer-events: none !important; height: 0px !important}",
  277. // {opacity:0% !important; pointer-events: none !important; height: 0px !important}
  278. netflav: "iframe[src*=xlv],.ads_video_overlay_mobile, div.widget-container, a[href*=\"register\"][target=\"_blank\"],div.ads_video_close_button,div.ads_video_overlay_mobile,div.footer_root,div.ads_head_banner_container {display:none !important;}",
  279. supjav: '#pop, .div_pop, #pop.div_pop, .movv-ad, #adsbox, div.right, div.movv-ad.ad_3_3, div.movv-ad.ad_3_2, .movv-ad, .adsbyexoclick, #adsbox, .adsbyexoclick {display:none !important; pointer-events: none !important;}',
  280. hitomi: ".container > div[class$=\"content\"] > div[class]:has(> script) {display:none !important; pointer-events: none !important;}",
  281. hanime1: "span.scaled-exoclick, iframe, #close-mobile-ad-btn, #bottom-ads, div[style*=\"width: 310px; height: 282px;\"] {display:none !important; pointer-events: none !important;}",
  282. javlibrary: ".menutext.whenmobile {top:90px;z-index:114;} a[href*='redirect'] {display:none!important} #toplogo {height:64px} .videothumblist .videos {min-width:auto;}.titlebox.whenmobile{width:250px} #topmenu.whenmobile {height:70px;} .searchbar.whenmobile{right:2px} div.videothumblist.whenmobile {overflow:scroll!important;overflow-x:hidden!important;} div#rightcolumn.whenmobile {width:300px} #rightcolumn {right:90px} #leftmenu {width:90px; position:fixed;} div#content {width:auto !important} body.main { min-width: auto; width:auto !important} iframe,img[src*='gif'] , td.advsearch {display:none!important;pointer-events: none !important;}",
  283. douban: "*{display:none!important}",
  284. olevod: "#adsbox, .ads-bg {display:none!important}",
  285. ntdm9: "#adsbox, .yammohxz_b {display:none !important; pointer-events: none !important;}",
  286. njav: "div[style=\"position: absolute; inset: 0px; z-index: 999; display: block;\"],.ad-floating,[src*='.gif'],iframe[width='300px'] {display:none!important}",
  287. jav_common: ".jw-wrapper > div[style=\"opacity: 0; visibility: hidden; overflow: hidden; display: block; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;\"],div[style^=\"position:fixed;inset:0px;z-index:2147483647;background:black;opacity:0.01\"] {height:0px; display:none !important; pointer-events: none !important;}",
  288. rouman: "div[role='dialog'] {display:none !important; pointer-events: none !important;}",
  289. diyibanzhu: "img, #adsbox, .slide-ad {height:0px; display:none !important; pointer-events: none !important;}",
  290. novel543: "iframe, div#adfoot, div.px-3.py-3, #adfoot, .gadBlock {height:0px; display:none !important; pointer-events: none !important;}"
  291. //button_common: "padding: 6px 6px 6px 6px; display: inline-block; color: white;z-index: 114154 !important; border-right: 6px solid #38a3fd; border-left: #292f33 !important; border-top: #292f33 !important; border-bottom: #292f33 !important; background: #2563eb; border-radius: 0px 0px 0px 0px; font-weight: 800 !important; text-align: right !important;" // 按钮/输入框通用样式
  292. },
  293. function: {
  294. }
  295. }
  296.  
  297. css_adsRemove(imax.css.othercss, 0, 'othercss') // 引用全局样式
  298.  
  299. function values() {
  300. var adsDomain = [
  301. "pornhub",
  302. "missav",
  303. "91porna",
  304. "91porn.",
  305. "avple",
  306. "18comic",
  307. "wnacg",
  308. "zhidao",
  309. "baidu",
  310. "ddys",
  311. "jable",
  312. "bdys",
  313. "google",
  314. "bing",
  315. "duboku",
  316. "libvio",
  317. "tvn",
  318. "www.5dy",
  319. "www.555dd",
  320. "o8tv",
  321. "555dyx",
  322. "instagram",
  323. "ttsp",
  324. "tz659",
  325. "nbys",
  326. "anime1",
  327. "yhpdm",
  328. "yhdmp",
  329. "nivod",
  330. "91short",
  331. "xiaobaotv",
  332. "xiaoxintv",
  333. "cupfoxapp",
  334. "iyf",
  335. "cnys",
  336. "javday",
  337. "xvideos",
  338. "javbus",
  339. "jav.land",
  340. "4hu",
  341. "netflav",
  342. "javplayer",
  343. "filemoon",
  344. "embedrise",
  345. "mmfl02",
  346. "mmsw02",
  347. "netflavns2",
  348. "supjav",
  349. "hanime1",
  350. "hitomi",
  351. "javlibrary",
  352. "emturbovid",
  353. 'netflavns1',
  354. 'fc2stream',
  355. 'douban',
  356. 'twitter',
  357. 'olevod',
  358. 'njav',
  359. 'ntdm9',
  360. 'rouman',
  361. 'novel543',
  362. 'diyibanzhu',
  363. 'hltv',
  364. "zhihu"
  365. ]
  366.  
  367. var url = document.location.href;
  368. console.log("URL : " + url); // 看看当前 URL
  369. var i;
  370. for (i = 0; i < adsDomain.length; i++) {
  371. if (url.indexOf(adsDomain[i]) !== -1) {
  372. var values = adsDomain[i]; // 释放参数值
  373. console.log("Catch it : " + values) // 看看控制台输出了个啥
  374. }
  375. }
  376. return values;
  377. }
  378.  
  379. function adsDomain_switch(x) { // 匹配参数值 执行相应函数
  380. switch (x) {
  381. case 'pornhub':
  382. pornhub_interstitialPass();
  383. //tag_adsRemove("script", "ads_batch");
  384. const custom_style_values_pb = "right: 0px !important; padding: 0 !important; position: relative !important;"
  385. css_adsRemove(imax.css.pornhubx, 500, "pornhubX");
  386.  
  387. setTimeout(() => {
  388. let ads_selector = [".topAdContainter", "a[href*='ads']", "a[href*='fuck']", "a[href*='ad']", "div.adContainer.clearfix.noBottom", ".adContainer.clearfix.middleVideoAdContainer"];
  389. let ads = setInterval(() => {
  390. ads_selector.forEach((x) => { selector_one_by_one(x) })
  391. console.log("清理还在继续..." + x)
  392. if (document.querySelectorAll(ads_selector).length == 0) {
  393. clearInterval(ads)
  394. console.log("清理计时器,ads移除完毕...")
  395. }
  396. }, 1000)
  397. }, 100)
  398.  
  399. let cssText = "font-size: smaller !important; background: #2563eb !important; left: 0px; top: 110px; margin-right: 5px; margin-top: 5px;" + "padding: 6px 6px 6px 6px; display: inline-block; color: white;z-index: 114154 !important; border-right: 6px solid #38a3fd; border-left: #292f33 !important; border-top: #292f33 !important; border-bottom: #292f33 !important; background: #2563eb; border-radius: 0px 0px 0px 0px; font-weight: 800 !important; text-align: right !important;"
  400. setTimeout(() => {
  401. ele_dynamicAppend("div.ratingInfo, div.categoryRow.ratingDetails.sectionPadding", "href", "如何下载视频?", cssText, "https://limbopro.com/archives/M3U8-Downloader.html", "download_pornhub", 2, "a")
  402. if (document.getElementById("download_pornhub")) {
  403. document.getElementById("download_pornhub").style = "display: inline !important;";
  404. document.getElementById("download_pornhub").target = "_blank !important;";
  405. }
  406. }, 3000)
  407.  
  408.  
  409. pornhub_sidebar_ads();
  410. break;
  411. case '91porna':
  412. //cloudflare_captchaBypass();
  413. css_adsRemove(imax.css.porna91);
  414. //_91porn_videoplay_ads();
  415.  
  416. // 播放页空白
  417.  
  418. document.querySelectorAll("br").forEach((x) => {
  419. if (x.clientHeight = 0) {
  420. x.remove()
  421. }
  422. })
  423.  
  424. break;
  425. case '91porn.':
  426. //cloudflare_captchaBypass();
  427. css_adsRemove(imax.css.porn91);
  428.  
  429. let url91 = document.location.href;
  430. if (url91.indexOf('view_') !== -1) {
  431. let play = setInterval(() => {
  432. if (document.querySelector('div.preroll-skip-button') !== null) {
  433. document.querySelector('div.preroll-skip-button').click();
  434. } else {
  435. clearInterval(play);
  436. }
  437. }, 1000)
  438. }
  439.  
  440.  
  441. //css_adsRemove(imax.css.porna91);
  442. //_91porn_videoplay_ads();
  443.  
  444. // 播放页空白
  445. /*
  446. document.querySelectorAll("br").forEach((x) => {
  447. if (x.clientHeight = 0) {
  448. x.remove()
  449. }
  450. })
  451. */
  452.  
  453. break;
  454. case 'avple':
  455. //cloudflare_captchaBypass();
  456. css_adsRemove(imax.css.avple);
  457. third_party_fileX("script", imax.js.avple, "body")
  458. break;
  459. case '18comic':
  460. css_adsRemove(imax.css.comic_18);
  461. button_dynamicRemove("#chk_cover", 200);
  462. _18comic_adsRemove();
  463. break;
  464. case 'www.5dy':
  465. adsDomain_switch("555dyx")
  466. break;
  467. case 'o8tv':
  468. adsDomain_switch("555dyx")
  469. break;
  470. case 'www.555dd':
  471. adsDomain_switch("555dyx")
  472. break;
  473. case "555dyx":
  474.  
  475.  
  476. let www = setInterval(() => {
  477. if (document.querySelector('video')) {
  478. document.querySelector('video').style = 'opacity: 1; filter: contrast(1.01) brightness(1.05) saturate(1.1);'
  479. /* if (document.querySelector('video').loop == 'false') {
  480. document.querySelector('video').setAttribute('loop', '')
  481. }
  482. */
  483. console.log("画面增强设置成功...")
  484. clearInterval(www)
  485. }
  486. }, 1000)
  487.  
  488. document.querySelectorAll('div.module').forEach((x) => { x.style.zIndex = 1 });
  489. css_adsRemove(imax.css.dy555, 0, "555dy")
  490. document.querySelectorAll('.popup-btn.close-pop')[0].click(); //模拟点击
  491. break;
  492. case 'wnacg':
  493. css_adsRemove(imax.css.wnacg);
  494. break;
  495. case 'zhidao':
  496. css_adsRemove(imax.css.baidu_zhidao)
  497. break;
  498. case 'baidu':
  499. console.log('Got u! baidu.com')
  500. let regex = /https?:\/\/(www|m)\.baidu\.com\/(from=|s\?)/gi
  501. window.location.href.search(regex) !== -1
  502. if (window.location.href.search(regex) !== -1) {
  503. css_adsRemove(imax.css.baidu_search);
  504. console.log('移除搜索结果广告🪧...')
  505. } else {
  506. adsDomain_switch("zhidao")
  507. css_adsRemove(imax.css.baidu_index);
  508. console.log('移首页广告🪧...')
  509. }
  510.  
  511. break;
  512. case 'ddys':
  513. //css_adsRemove(imax.css.ddrk);
  514. css_adsRemove(imax.css.ddrk2);
  515.  
  516. //selector_adsRemove("#sajdhfbjwhe,#kasjbgih,#fkasjgf,img[src*='bcebos']", 0)
  517.  
  518. var divx = document.createElement('div');
  519. divx.id = 'adblock4limbox';
  520. divx.style = 'display:none;'
  521. var body = document.querySelectorAll('body')[0];
  522. //body.appendChild(divx);
  523. var child = document.querySelectorAll('#sajdhfbjwhe,#kasjbgih,#fkasjgf')
  524. child.forEach((x) => {
  525. divx.appendChild(x);
  526. })
  527.  
  528. break;
  529. case 'duboku':
  530. third_party_fileX("script", imax.js.duboku, "body")
  531. break;
  532. case 'libvio':
  533. css_adsRemove(imax.css.libvio)
  534. break;
  535. case 'nbys':
  536. css_adsRemove(imax.css.nivod);
  537. break;
  538. case 'ntdm9':
  539. css_adsRemove(imax.css.ntdm9);
  540. const a = document.getElementsByClassName("yammohxz_b");
  541. addEventListener_defuser("touchend"); // 打断监听器
  542.  
  543. for (i = 0; i < a.length; i++) {
  544. a[i].style = "display: none !important; z-index:-114154; display:block; width:0vw; height:0";
  545. }
  546.  
  547. break;
  548. case 'tvn':
  549. css_adsRemove(imax.css.tvn)
  550. break;
  551. case 'jable': // 2333
  552. console.log("IT'S JABLE");
  553.  
  554. window.onload = function () {
  555.  
  556. if (document.location.href.search('search') !== -1) {
  557. let regex = /.*\/search\//;
  558. let code = window.location.pathname.replace(regex, '').replace('/', '').toLowerCase()
  559. setTimeout(() => {
  560. tmd('#list_videos_videos_list_search_result > nav', code, '试试其他搜索:');
  561. }, 2000)
  562. console.log("生成搜索链接🔗");
  563. }
  564.  
  565. if (document.querySelector('.plyr__poster') !== null) { // 在其他站点播放
  566. let regex = /.*\/videos\//;
  567. let code = window.location.pathname.replace(regex, '').replace('/', '').toLowerCase();
  568. setTimeout(() => {
  569. tmd('h4', code, '在其他站点播放:');
  570. console.log("生成在其他站点播放链接🔗");
  571. }, 2000)
  572. }
  573.  
  574. }()
  575.  
  576. // 子域名跳转至主域名 jable.tv
  577. if (/\b(.*\.)(jable\.tv.*)\b/i.test(window.location.href.toLowerCase())) {
  578. console.log(window.location.href.toLowerCase())
  579. let url_jable_rewrite = window.location.href.toLowerCase().replace(/https:\/\/\w{2,3}\./i, "https://")
  580. console.log(url_jable_rewrite)
  581. window.location.replace(url_jable_rewrite)
  582. }
  583.  
  584. // 去除首页广告
  585. if (document.querySelectorAll('div.col-6.col-sm-4.col-lg-3').length > 0) {
  586. document.querySelectorAll('div.col-6.col-sm-4.col-lg-3').forEach((x) => { // xxx
  587. if (x.querySelectorAll("[target='_blank']").length > 0) {
  588. x.style = "display: none !important; z-index:-114154; display:block; width:0vw; height:0";
  589. }
  590. })
  591. }
  592.  
  593. //cloudflare_captchaBypass();
  594. css_adsRemove(imax.css.jable);
  595. jable_adsRemove();
  596. const url_jable = document.location.href;
  597. const reg_videos = /^https:\/\/jable\.tv\/videos/gi;
  598. if (url_jable.search(reg_videos) !== -1) {
  599.  
  600. setTimeout(() => {
  601. let cssText = "margin-left: 5px; margin-top: 5px; position: static; font-size: smaller !important; background: #2563eb !important; margin-right: 5px; padding: 6px 6px 6px 6px; display: inline-block; color: white; border-right: 6px solid #38a3fd; border-left: #292f33 !important; border-top: #292f33 !important; border-bottom: #292f33 !important; background: #2563eb; border-radius: 0px 0px 0px 0px; font-weight: 800 !important; text-align: right !important;"
  602. let cssText2 = "width:72px; margin-left: 5px; margin-top: 5px; position: static; font-size: smaller !important; background: #2563eb !important; margin-right: 5px; padding: 6px 6px 6px 6px; display: inline-block; color: white; border-right: 6px solid #38a3fd; border-left: #292f33 !important; border-top: #292f33 !important; border-bottom: #292f33 !important; background: #2563eb; border-radius: 0px 0px 0px 0px; font-weight: 800 !important; text-align: right !important;"
  603. ele_dynamicAppend("div.header-left > h6", "onclick", "code", cssText2, "", "avCodeCopy", 13, "input");
  604. ele_dynamicAppend("div.header-left > h6", "onclick", "复制番号", cssText, "", "copyavCode", 14, "button");
  605. ele_dynamicAppend("div.header-left > h6", "onclick", "", cssText, "", "copy", 15, "input");
  606. ele_dynamicAppend("div.header-left > h6", "onclick", "复制M3U8文件地址", cssText, "", "jablex", 16, "button")
  607. ele_dynamicAppend("div.header-left > h6", "onclick", "如何下载视频?", cssText, "window.open(\"https://limbopro.com/archives/M3U8-Downloader.html\", \"_blank\")", "how", 17, "button");
  608. var regex = /[a-zA-Z]{3,5}\-\d{3,5}/i
  609. var avCode = document.querySelectorAll('h4')[0].innerText.match(regex)[0]
  610. //let avCode = window.location.pathname.replace('/videos/', '').replace('/', '')
  611. let input = document.querySelector('#avCodeCopy')
  612. input.value = avCode
  613. // 添加监听器
  614. addListenerById("jablex", () => { copyText("copy", "jablex", "复制M3U8文件地址") }, 0);
  615. addListenerById("copyavCode", () => { avCodeCopy() }, 0);
  616. }, 3000)
  617.  
  618. function avCodeCopy() {
  619. // 复制工作开始
  620. let civ = document.querySelector('#avCodeCopy')
  621. civ.select()
  622. document.execCommand('copy')
  623. // 复制工作结束
  624.  
  625. document.querySelector('#copyavCode').innerHTML = '复制成功!'
  626. document.querySelector('#copyavCode').setAttribute('class', 'jable_css')
  627. setTimeout(() => {
  628. document.querySelector('#copyavCode').innerHTML = '复制番号'
  629. document.querySelector('#copyavCode').className = ''
  630. }, 1500)
  631. //}, 0)
  632. }
  633.  
  634. setTimeout(() => { repeat_regex.forEach(m3u8_tempt) }, 4000);
  635. }
  636.  
  637.  
  638. break;
  639. case 'bdys':
  640. css_adsRemove(imax.css.btbdys, 0, "siwtch_button");
  641. css_adsRemove(imax.css.switch, 0, "switch_class")
  642. //videoAds_accelerateSkip(0.1); // 视频广告加速
  643. //setConstant(); // 视频广告加速
  644. hrefAttribute_set();
  645.  
  646. if (document.querySelectorAll('li[data-increase]')[1] !== null) {
  647. document.querySelectorAll('li[data-increase]')[1].click()
  648. }
  649.  
  650. var url = document.location.href;
  651. if (url == "https://www.bdys10.com/" || url == "https://www.bdys03.com/") {
  652. if (!document.getElementById("bdys")) {
  653. ele_dynamicAppend("div.container-xl", "onclick", "隐藏公告", "position:inherit; right:92px;" + "padding: 6px 6px 6px 6px; display: inline-block; color: white;z-index: 114154 !important; border-right: 6px solid #38a3fd; border-left: #292f33 !important; border-top: #292f33 !important; border-bottom: #292f33 !important; background: #2563eb; border-radius: 0px 0px 0px 0px; font-weight: 800 !important; text-align: right !important;", "", "bdys", 1, "button");
  654. addListenerById("bdys", () => { notice_hidden("div.col-12") }, 2000);
  655. }
  656. if (getCookie_("hidden") == 1) {
  657. notice_hidden("div.col-12");
  658. }
  659. }
  660. break;
  661. case 'instagram':
  662. // 解除 Instagram 桌面浏览器版禁用右键复制图片
  663. css_adsRemove(imax.css.instagram);
  664. break;
  665. case 'ttsp':
  666. css_adsRemove(imax.css.ttsp);
  667. break;
  668. case 'tz659':
  669. css_adsRemove(imax.css.tz659);
  670. //tag_ads_traversal("body", 0)
  671. break;
  672. case 'anime1':
  673. css_adsRemove(imax.css.anime);
  674. break;
  675. case 'yhdmp':
  676. css_adsRemove(imax.css.yhdmp);
  677. break;
  678. case 'yhpdm':
  679. css_adsRemove(imax.css.yhdmp);
  680. break;
  681. case 'google':
  682. css_adsRemove(imax.css.google);
  683. var userAgent = navigator.userAgent.toLowerCase();
  684. if (/\b(mobile)\b/i.test(userAgent)) {
  685. js_adsRemove(imax.js.contentFarm);
  686. console.log("getYou") // 手机用户 特别是苹果用户会正常加载内容农场脚本
  687. } else {
  688. js_adsRemove(imax.js.contentFarm);
  689. console.log("PC端") // 啥也不做
  690. }
  691. //var goole_selector = "h3,#bres,[class*='AuVD wHYlTd mnr-c']";
  692. //setAttribute_after(goole_selector, "contentFarm_AdsRemove_Auto()");
  693. break;
  694. case 'bing':
  695. js_adsRemove(imax.js.contentFarm);
  696. break;
  697.  
  698. case 'hltv':
  699. css_adsRemove(imax.css.hltv);
  700. noWindowOpenIf(); // no-window-open-if
  701. break;
  702.  
  703. case 'nivod': // nbys 泥巴影视
  704. css_adsRemove(imax.css.nivod);
  705. hrefAttribute_set();
  706. setConstant('detailParams.is_ad_play', 'false'); // 泥巴影视PC版播放页视频广告加速
  707. evaldataPrune(); // 泥巴影视移动版播放页视频广告加速
  708. css_adsRemove(imax.css.nbys); // 网页图片广告
  709. setInterval(() => {
  710. remove_parentElement_by_child('view.nut-swiper-item.slider-item', "img[src*='1a732eeb1adb']");
  711. remove_parentElement_by_child('view.nut-swiper-item.slider-item', "img[src*='49e8abd32d13']");
  712. remove_parentElement_by_child('.qy20-h-carousel__ul', "span[style*='d92ea585-0']");
  713. remove_parentElement_by_child("li.qy20-h-carousel__li", "span[style*='0891']");
  714. remove_parentElement_by_child("li.qy20-h-carousel__li", "span[style*='1a2d']");
  715. }, 2000)
  716. break;
  717. case '91short':
  718. css_adsRemove(imax.css._91short);
  719.  
  720. // 播放页GIF动图广告
  721. const player_info = document.querySelectorAll("div.player-info,li.nav-menu-item")
  722. for (i = 0; i < player_info.length; i++) {
  723. const selector = ['div > a[href][target=_blank]', 'a[href*=kyty]']
  724. if (player_info[i].querySelectorAll(selector).length >= 1) {
  725. player_info[i].style = "display: none !important;";
  726. }
  727. }
  728.  
  729. // 多余的高
  730. document.querySelector("div.highlight-box").style = "display: none !important;";
  731. addEventListener_defuser("touchend"); // 打断监听器
  732. break;
  733.  
  734. case 'xiaobaotv':
  735. // nothing to do.
  736. break;
  737. case 'cupfoxapp':
  738. css_adsRemove(imax.css.cupfoxapp, 100, 'fuckcupfoxapp');
  739. break;
  740. case 'iyf':
  741.  
  742. css_adsRemove(imax.css.iyf, 100, 'fuckiyf');
  743. function iyf_css() {
  744. setTimeout(() => {
  745. let iyf_css = "div.ad, .ad, .ad_tag, .dabf > .ng-star-inserted,vg-pause-f, .pggf > .ng-star-inserted"
  746. document.querySelectorAll(iyf_css).forEach((x) => {
  747. x.style = 'display:none;height:0px;'
  748. })
  749. }, 1500)
  750. }
  751.  
  752. //iyf_css();
  753.  
  754. aopr();
  755.  
  756. window.onload = function iyf_hd_switch() {
  757.  
  758. if (document.querySelectorAll('li[data-v-7f52b4c5').length !== 0) {
  759. document.querySelectorAll('span[data-v-7f52b4c5].leg.relative')[0].click()
  760. }
  761.  
  762. setTimeout(() => {
  763. let hd = document.querySelectorAll('li[data-v-7f52b4c5')
  764. hd.forEach((x) => {
  765. console.log(x.className)
  766. if (x.className.search('vip|button') == -1) {
  767. if (x.className !== 'active') {
  768. x.click()
  769. console.log('点击...')
  770. }
  771. console.log('此前已点击...')
  772. if (document.querySelector('.van-overlay').style.display !== 'none'
  773. ) {
  774. document.querySelector('.van-overlay').click()
  775. }
  776. }
  777. })
  778. }, 1500)
  779. }
  780.  
  781. // .player-container .play_info
  782. function index(x, id) {
  783. if (document.querySelector(x) !== null) {
  784.  
  785. if (document.querySelector('#' + id) == null) {
  786. let a = document.createElement('a')
  787. a.href = 'https://www.iyf.tv/'
  788. a.style = 'position:absolute;right:9px;top:0%;color:aqua;z-index:114154;'
  789. a.id = id
  790. a.textContent = '返回首页🏠'
  791. let parentElement = document.querySelector(x)
  792. parentElement.appendChild(a)
  793. console.log('生成首页按钮')
  794. }
  795.  
  796. if (document.querySelector('#' + id)) {
  797. console.log('Got u!')
  798. } else {
  799. newx();
  800. }
  801.  
  802. }
  803. }
  804.  
  805. function newx() {
  806. setTimeout(() => {
  807. index('.play_info', 'iyf_index')
  808. //index('div.player-container', 'iyf_news')
  809. }
  810. , 1500)
  811. }
  812.  
  813. newx();
  814.  
  815. var currentUrl = window.location.href;
  816. setInterval(function () {
  817. if (window.location.href !== currentUrl) {
  818. console.log('URL发生变化');
  819. newx();
  820. currentUrl = window.location.href;
  821.  
  822. }
  823. }, 2000);
  824.  
  825. videoAds_accelerateSkip(0.1); // 视频广告加速
  826. setConstant(); // 视频广告加速
  827. break;
  828.  
  829. case 'cnys':
  830. // nothing to do.
  831. //videoAds_accelerateSkip(0.1); // 视频广告加速
  832. //setConstant(); // 视频广告加速
  833. css_adsRemove(imax.css.cnys, 0, 'cnys')
  834.  
  835. if (document.querySelectorAll('iframe')[2] !== null && document.querySelectorAll('iframe')[2] !== undefined) {
  836. document.querySelectorAll('iframe')[2].style = 'opacity:0% !important; pointer-events: none !important;';
  837. setTimeout(() => {
  838. document.querySelectorAll('iframe')[2].style = 'opacity:1 !important; pointer-events: auto !important;';
  839. setTimeout(() => {
  840. document.querySelectorAll('iframe')[2].contentWindow.document.querySelectorAll('body')[0].querySelectorAll('div#player_pause')[0].style = 'display:none !important';
  841. setTimeout(() => {
  842.  
  843. //document.querySelectorAll('iframe')[2].contentWindow.document.querySelectorAll('body')[0].querySelectorAll('button.yzmplayer-icon.yzmplayer-play-icon')[0].click();
  844.  
  845. document.querySelectorAll('iframe')[2].contentWindow.document.querySelectorAll('body')[0].querySelectorAll('button.yzmplayer-icon.yzmplayer-play-icon')[0].addEventListener('touchend', function () {
  846. setTimeout(() => {
  847. document.querySelectorAll('iframe')[2].contentWindow.document.querySelectorAll('body')[0].querySelectorAll('div#player_pause')[0].style = 'display:none !important';
  848. }, 10);
  849. });
  850.  
  851. }, 1000)
  852. }, 3000)
  853. }, 7500)
  854. }
  855.  
  856. //document.querySelectorAll('iframe')[2].contentWindow.document.querySelectorAll('body')[0].querySelectorAll('#ADtip')[0].style = 'display:none';
  857.  
  858. break;
  859.  
  860. case 'xiaoxintv':
  861. // nothing to do.
  862. adsDomain_switch("xiaobaotv")
  863. break;
  864.  
  865. case 'javday':
  866. // nothing to do.
  867. css_adsRemove(imax.css.javday, 0, 'javday')
  868. break;
  869. case 'xvideos':
  870.  
  871. setInterval(() => {
  872. if (!document.getElementById('xvideos_t')) {
  873. css_adsRemove(imax.css.xvideos, 100, "xvideos_t");
  874. noWindowOpenIf();
  875. } else {
  876. noWindowOpenIf();
  877. }
  878. }, 1000)
  879.  
  880. break;
  881. case 'javbus':
  882. css_adsRemove(imax.css.javbus, 0, "javbus");
  883.  
  884. function javbus() { // 在番号详情页追加在线预览链接
  885. setTimeout(() => {
  886. let father = 'div.col-md-3.info';
  887. let code = window.location.pathname.replace('/', '')
  888. let url = window.location.href
  889. let regx = /[a-zA-Z]{3,5}\-\d{3,5}/i
  890.  
  891.  
  892. if (url.search(regx) !== -1) {
  893. tmd(father, code, '在线预览: ')
  894. } else {
  895. console.log('当前网站不不匹配')
  896. }
  897. }, 2000)
  898. }
  899.  
  900. javbus()
  901.  
  902. break;
  903. case 'jav.land': // 444
  904. css_adsRemove(imax.css.javland, 0, "javland");
  905.  
  906. function jav() {
  907. if (document.querySelectorAll('td[width="80%"]')[1] !== null) {
  908. let code = document.querySelectorAll('td[width="80%"]')[1].textContent
  909.  
  910.  
  911. // 在番号详情页追加在线预览链接
  912. function tmd(parentsSelector, code, textContent) {
  913.  
  914. function otherSearch() {
  915. // 试试其他搜索:
  916.  
  917. let parentElement = document.querySelectorAll(parentsSelector)[0]
  918.  
  919. let p1 = document.createElement('p')
  920. p1.id = 'p1'
  921. p1.style = 'margin:10px 0px 0px 0px; border-left:6px solid #38a3fd; font-size:14px; border-radius: 4px !important;box-shadow: rgb(151, 151, 151) 0px 0px 0px 0px inset; /*inset 0px 0px 15px 3px #979797;*/ background:#10141f; color:chocolate; padding:0px 0px 0px 0px;word-break:break-all;border-radius:0px 0px 0px 0px'
  922.  
  923. let p2 = document.createElement('p')
  924. p2.style = 'padding-left:6px;font-weight:inherit; padding:6px; word-break:break-all;font-size:inherit;border-radius:0px'
  925. p2.id = 'p2'
  926.  
  927.  
  928. p1.appendChild(p2)
  929. parentElement.insertBefore(p1, parentElement.childNodes[2])
  930.  
  931. let span = document.createElement('span')
  932. span.style = 'font-weight:bolder;font-size:medium;color:bisque;'
  933. span.textContent = textContent
  934. p2.appendChild(span)
  935.  
  936. function aAdd2Parent(siteName, url, codeSlect) {
  937. let a = document.createElement('a')
  938. let lable = document.createElement('label')
  939. lable.style = 'font-weight:inherit;display:inline-block;max-width:100%;margin-right:10px;'
  940. a.href = url + codeSlect
  941. a.textContent = siteName
  942. a.target = '_blank'
  943. a.style = 'color:inherit;/*text-decoration:revert !important;*/ font-weight:inherit'
  944. lable.appendChild(a)
  945. p2.appendChild(lable)
  946. }
  947.  
  948. aAdd2Parent('MissAV[720P]', 'https://missav.com/search', '/' + code)
  949. aAdd2Parent('Jable[HD]', 'https://jable.tv/search', '/' + code + '/')
  950. aAdd2Parent('Supjav[ultraHD]', 'https://supjav.com/?s=', code)
  951. aAdd2Parent('番号搜索[聚合]', 'https://limbopro.com/btsearch.html#gsc.tab=0&gsc.q=', code + "&gsc.sort=")
  952. aAdd2Parent('谷歌搜索🔍', 'https://www.google.com/search?q=', code)
  953. aAdd2Parent('Javbus📖', 'https://www.javbus.com/search/', code + '&type=&parent=ce')
  954. console.log('已生成在线预览链接🔗')
  955. }
  956. otherSearch()
  957. }
  958.  
  959. setTimeout(() => {
  960. tmd('.col-md-6.col-sm-12.col-xs-12', code, '在线预览: ');
  961. }, 100)
  962. }
  963. }
  964.  
  965. jav();
  966.  
  967. break;
  968. case "4hu":
  969. css_adsRemove(imax.css._4hu);
  970. hrefAttribute_set();
  971. break;
  972. case "netflav":
  973. window_open_defuser(); // 打断 window.open 施法
  974. css_adsRemove(imax.css.netflav, 0, "4hu");
  975. break;
  976. case "filemoon":
  977. window_open_defuser(); // 打断 window.open 施法
  978. break;
  979. case "embedrise":
  980. window_open_defuser(); // 打断 window.open 施法
  981. break;
  982. case "mmfl02":
  983. window_open_defuser(); // 打断 window.open 施法
  984. break;
  985. case "mmsw02":
  986. window_open_defuser(); // 打断 window.open 施法
  987. break;
  988. case "emturbovid":
  989. window_open_defuser(); // 打断 window.open 施法
  990. break;
  991. case "netflavns1":
  992. window_open_defuser(); // 打断 window.open 施法
  993. css_adsRemove(imax.css.js_common, 50, 'common');
  994. break;
  995. case "netflavns2":
  996. window_open_defuser(); // 打断 window.open 施法
  997. break;
  998. case "fc2stream":
  999. window_open_defuser(); // 打断 window.open 施法
  1000. abort_on_property_read('__Y');
  1001. break;
  1002. case "javplayer":
  1003. adsDomain_switch("fc2stream")
  1004. break;
  1005. case "supjav":
  1006. css_adsRemove(imax.css.supjav, 0, "superjav");
  1007. window.onload = function () {
  1008. if (document.location.href.search('/?s\=') !== -1) {
  1009. let regex = /.*\/\?s=/;
  1010. let code = window.location.href.replace(regex, '').replace('/', '').toLowerCase();
  1011. setTimeout(() => {
  1012. tmd('div.archive-title', code, '试试其他搜索:');
  1013. }, 2000)
  1014. console.log("生成搜索链接🔗");
  1015. }
  1016.  
  1017. if (document.querySelector('#player-wrap') !== null) { // 在其他站点播放
  1018. var regex = /[a-zA-Z]{3,5}\-\d{3,5}/i
  1019. var code = document.querySelectorAll('title')[0].innerText.match(regex)[0]
  1020. setTimeout(() => {
  1021. tmd('h1', code, '在其他站点播放:');
  1022. }, 2000)
  1023. }
  1024.  
  1025. }()
  1026.  
  1027. noWindowOpenIf('window.open')
  1028. noWindowOpenIf('touchend')
  1029.  
  1030. break;
  1031. case "njav":
  1032. css_adsRemove(imax.css.njav, 0, 'njav');
  1033. js_adsRemove(uBlockOrigin.setconstant);
  1034. js_adsRemove(uBlockOrigin.nowindowopenif);
  1035. noWindowOpenIf('window.open')
  1036. noWindowOpenIf('touchend')
  1037. window_open_defuser(); // 打断 window.open 施法
  1038. break;
  1039.  
  1040. case "hitomi":
  1041. css_adsRemove(imax.css.hitomi);
  1042. window_open_defuser();
  1043. abort_on_property_read();
  1044. js_adsRemove(uBlockOrigin.addEventListenerdefuser);
  1045. js_adsRemove(uBlockOrigin.noevalif);
  1046. break;
  1047.  
  1048. case "hanime1":
  1049. css_adsRemove(imax.css.hanime1);
  1050. const div = document.querySelectorAll('div.hidden-xs.hidden-sm')
  1051. // PC 端div元素广告移除
  1052. for (i = 0; i < div.length; i++) {
  1053. if (div[i].querySelectorAll('iframe').length > 0) {
  1054. div[i].style = "display: none !important;";
  1055. }
  1056. }
  1057.  
  1058. /*
  1059. let ads = document.querySelectorAll('div.hidden-sm.hidden-md');
  1060. for (i = 0; i < ads.length; i++) {
  1061. if (ads[i].querySelectorAll("a[href*='abs']")) {
  1062. ads[i].remove();
  1063. }
  1064. }
  1065. */
  1066.  
  1067. break;
  1068. case "javlibrary":
  1069.  
  1070. css_adsRemove(imax.css.javlibrary)
  1071. window_open_defuser(); // 打断 window.open 施法
  1072. abort_on_property_read();
  1073. js_adsRemove(uBlockOrigin.addEventListenerdefuser);
  1074. js_adsRemove(uBlockOrigin.noevalif);
  1075.  
  1076. if (/\b(https:\/\/www.javlibrary.com\/.*?)(\/videoreviews.php)(\?.*)(&mode=2)\b/i.test(window.location.href.toLowerCase())) {
  1077. console.log(window.location.href.toLowerCase())
  1078. let url_jav_rewrite = window.location.href.toLowerCase().replace(/(videoreviews.php)/i, '').replace(/(&mode=2)/i, '')
  1079. console.log(url_jav_rewrite)
  1080. window.location.replace(url_jav_rewrite)
  1081. }
  1082.  
  1083. function javlibrary() {
  1084. // '#topmenu', 'div.menutext', '.searchbar',
  1085. css_adsRemove(imax.css.javlibrary);
  1086. var target_ = ['#rightcolumn', '.videothumblist', '.titlebox', '.menutext']
  1087.  
  1088. if (window.innerWidth < 650) {
  1089. console.log("现在执行缩小任务")
  1090. function ifAdd(target) {
  1091. if (document.querySelectorAll(target)[0]) {
  1092. document.querySelectorAll(target)[0].classList.add('whenmobile')
  1093. }
  1094. }
  1095. target_.forEach(ifAdd);
  1096. if (document.querySelector('div#rightcolumn')) {
  1097. var parentElement = document.querySelector('div#rightcolumn')
  1098. if (document.querySelectorAll("td[style='vertical-align: top;']")[1]) {
  1099. var child = document.querySelectorAll("td[style='vertical-align: top;']")[1];
  1100. }
  1101. if (document.querySelector('div.socialmedia')) {
  1102. var insertBeforethisgay = document.querySelector('div.socialmedia');
  1103. }
  1104.  
  1105. if ((child) && (parentElement) && (insertBeforethisgay)) {
  1106. parentElement.insertBefore(child, insertBeforethisgay)
  1107. }
  1108. document.querySelectorAll('td.t>div').forEach((x) => {
  1109. x.style.width = 'auto';
  1110.  
  1111. })
  1112. }
  1113.  
  1114. if (document.querySelector('div#video_title')) {
  1115. document.querySelector('#rightcolumn').style.width = window.innerWidth - 90 + "px"
  1116. document.querySelector('div#video_favorite_edit').style.width = '250px'
  1117. }
  1118. } else {
  1119. console.log("现在执行扩大任务")
  1120. if (document.querySelector('div#video_title')) {
  1121. document.querySelector('#rightcolumn').style.width = window.innerWidth + "px"
  1122. document.querySelector('div#video_favorite_edit').style.width = 'auto'
  1123. }
  1124. function ifRemove(target) {
  1125. if (document.querySelectorAll(target)[0]) {
  1126. document.querySelectorAll(target)[0].classList.remove('whenmobile')
  1127. }
  1128. }
  1129. target_.forEach(ifRemove);
  1130. }
  1131. }
  1132.  
  1133. javlibrary(); // 2333
  1134.  
  1135. zjpl()
  1136. function zjpl() {
  1137. setTimeout(() => { // 最佳评论页 调换位置
  1138. javlibrary();
  1139. if (document.querySelectorAll('td.info')[0]) {
  1140. document.querySelectorAll('td.info').forEach((x) => {
  1141. x.style.width = "60px"
  1142. x.querySelectorAll('*').forEach((y) => {
  1143. // y.style.width = "60px"
  1144. })
  1145. })
  1146.  
  1147. var ff = document.querySelectorAll("table.comment > tbody > tr");
  1148. for (i = 0; i < ff.length; i++) {
  1149. ff[i].insertBefore(ff[i].querySelectorAll('td')[1], ff[i].querySelectorAll('td')[0])
  1150. }
  1151. }
  1152. }, 1500)
  1153. }
  1154.  
  1155. function javLibrary_links() { // 在番号详情页追加在线预览链接
  1156.  
  1157. setTimeout(() => {
  1158. let father = 'div#video_info'
  1159. //let code = window.location.pathname.replace('/', '')
  1160. let code = document.querySelectorAll('td.text')[0].textContent
  1161.  
  1162. let url = window.location.href
  1163. //let regx = /[a-zA-Z]{3,5}\-\d{3,5}/i
  1164. let regx = /www\.javlibrary\.com\/cn\/\?v\=jav/i
  1165.  
  1166. if (url.search(regx) !== -1) {
  1167. tmd(father, code, '在线预览: ')
  1168. } else {
  1169. console.log('当前网站不不匹配')
  1170. }
  1171. }, 2000)
  1172. }
  1173.  
  1174. javLibrary_links()
  1175.  
  1176. case 'douban':
  1177. if (document.querySelectorAll('a.Ims1t')[0]) {
  1178. alert("首页...")
  1179. document.querySelectorAll('a.Ims1t').forEach((x) => { x.href = 'https://movie.douban.com/top250' })
  1180. }
  1181. break;
  1182.  
  1183. break;
  1184. case 'zhihu':
  1185. var zhihu_id = "zhihux"
  1186. button_dynamicRemove("[class='Button Modal-closeButton Button--plain']", 10);
  1187. css_adsRemove(imax.css.zhihuAds, 100, "hloyx");
  1188. indexLogin();
  1189. addListener("div.TopNavBar-tab-d8yaD", () => { indexLogin() });
  1190. break;
  1191. case 'olevod':
  1192. css_adsRemove(imax.css.olevod, 0, 'fuckolevod');
  1193. setTimeout(() => {
  1194. onAdsHide()
  1195. }, 500)
  1196. break;
  1197.  
  1198. case 'rouman':
  1199. css_adsRemove(imax.css.rouman, 100, 'roumanx');
  1200.  
  1201. setTimeout(() => {
  1202. document.querySelectorAll("div[class*='modalCloseButton']")[0].click()
  1203. }, 500)
  1204.  
  1205. break;
  1206.  
  1207. case 'novel543':
  1208. css_adsRemove(imax.css.novel543, 100, 'novel543x');
  1209. break;
  1210.  
  1211. case 'diyibanzhu':
  1212. css_adsRemove(imax.css.diyibanzhu, 100, 'novel543x');
  1213. window_open_defuser(); // 打断 window.open 施法
  1214. break;
  1215.  
  1216. case 'missav':
  1217.  
  1218. window.onload = function () {
  1219. if (document.location.href.search('search') !== -1) {
  1220. let regex = /.*\/search\//;
  1221. let code = window.location.pathname.replace(regex, '').replace('/', '').toLowerCase()
  1222. setTimeout(() => {
  1223. tmd('h1', code, '试试其他搜索:');
  1224. }, 2000)
  1225. console.log("生成搜索链接🔗");
  1226. }
  1227.  
  1228.  
  1229. setTimeout(() => {
  1230. if (document.querySelector('.plyr__poster') !== null) { // 播放页插入其他站点播放链接
  1231. let code = document.querySelectorAll('span.font-medium')[0].textContent;
  1232.  
  1233. tmd('span.font-medium', code, '在其他站点播放:');
  1234.  
  1235. console.log("生成在其他站点播放链接🔗");
  1236. }
  1237. }, 2000)
  1238.  
  1239. }()
  1240.  
  1241. css_adsRemove(imax.css.missav, 100, 'missavx');
  1242. window_open_defuser(); // 打断 window.open 施法
  1243. var ua_missav = navigator.userAgent.toLowerCase();
  1244. var mobile_missav = "mobile";
  1245. //cloudflare_captchaBypass();
  1246.  
  1247. setTimeout(() => {
  1248. let cssText = "font-size: smaller !important; background: #2563eb !important; left: 0px; top: 110px; margin-right: 5px; margin-top: 5px;" + "padding: 6px 6px 6px 6px; display: inline-block; color: white;z-index: 114154 !important; border-right: 6px solid #38a3fd; border-left: #292f33 !important; border-top: #292f33 !important; border-bottom: #292f33 !important; background: #2563eb; border-radius: 0px 0px 0px 0px; font-weight: 800 !important; text-align: right !important;"
  1249. if (ua_missav.indexOf(mobile_missav) === -1) {
  1250.  
  1251. if (document.querySelector('div.mt-4') !== null && document.querySelector('div.mt-4').querySelector('h1') !== null) {
  1252. ele_dynamicAppend("div.mt-4", "onclick", "离开页面视频继续播放", cssText, "", "missavX", 2, "button");
  1253. ele_dynamicAppend("div.mt-4", "onclick", "暂停", cssText, "", "missavP", 3, "button");
  1254. ele_dynamicAppend("div.mt-4", "href", "如何下载视频", cssText, "https://limbopro.com/archives/M3U8-Downloader.html", "how", 4, "a");
  1255. }
  1256.  
  1257. if (document.getElementById("how") !== null) {
  1258. document.getElementById("how").target = "_blank";
  1259. }
  1260.  
  1261. // 添加监听器
  1262. if (document.getElementById("missavX")) {
  1263. addListenerById("missavX", () => { video_loopPlay('loop') }, 1000);
  1264. }
  1265.  
  1266. if (document.getElementById("missavP")) {
  1267. addListenerById("missavP", () => { video_loopPlay('pause') }, 1000);
  1268. }
  1269.  
  1270. } else if (ua_missav.indexOf(mobile_missav) > -1) {
  1271. ele_dynamicAppend("div.mt-4", "onclick", "免广告播放", cssText, "video_Play()", "missavX", 0, "button");
  1272. ele_dynamicAppend("div.mt-4", "onclick", "进入全屏", cssText, "fullscreen()", "missavFullScreen", 2, "button");
  1273. ele_dynamicAppend("div.mt-4", "onclick", "暂停", cssText, "video_pause()", "missavPause", 1, "button");
  1274. ele_dynamicAppend("div.mt-4", "href", "如何下载视频", cssText, "https://limbopro.com/archives/M3U8-Downloader.html", "how", 4, "a");
  1275. // 添加监听器
  1276.  
  1277. if (document.getElementById("how") !== null) {
  1278. document.getElementById("how").target = "_blank";
  1279. }
  1280.  
  1281. addListenerById("missavX", () => { video_Play() }, 1000);
  1282. addListenerById("missavFullScreen", () => { fullscreen() }, 1000);
  1283. addListenerById("missavPause", () => { video_pause() }, 1000);
  1284. }
  1285. }, 3000)
  1286.  
  1287. break;
  1288. default:
  1289. // 修正 case 中 default 的匹配规则 10.25.203
  1290. if (/\b(netflav|missav|jable)\b/i.test(window.location.href.toLowerCase())) {
  1291. if (document.querySelector('video')) {
  1292. abort_on_property_read('__Y');
  1293. window_open_defuser(); // 打断 window.open 施法
  1294. }
  1295. }
  1296.  
  1297. console.log("Catch Nothing! DEFAULT!");
  1298. //alert('DEFAULT!CATCH!')
  1299. }
  1300. }
  1301.  
  1302. adsDomain_switch(values()) // 动手吧
  1303.  
  1304. function daohang_build() { // 如果导航按钮不存在,则引入外部脚本进行创建;
  1305. var csp_regex = new RegExp(/\b(twitter|xvideos)\b/i);
  1306. //if (!(csp_regex.test(window.location.href.toLowerCase()))) {
  1307. if (csp_regex.test(window.location.href.toLowerCase()) && !(/\b(mobile)\b/i.test(navigator.userAgent.toLowerCase()))) {
  1308. console.log('CSP + PC, SO DO NOTING.')
  1309. } else if (window.location.href.toLowerCase().indexOf('91porn.') !== -1) {
  1310. console.log('SO DO NOTING.')
  1311. } else {
  1312. let daohang = setInterval(() => {
  1313. if (!((document.querySelector("button#x4Home")) && (document.querySelector("script[src*='Adblock4limbo.function.js']")))) {
  1314. third_party_fileX("script", imax.js.functionx, "body"); // js 外部引用 标签 <script>
  1315. console.log('functionx.js 首次引用成功,等待生效...')
  1316. clearInterval(daohang);
  1317. } else if (document.querySelectorAll("button#x4Home").length >= 1) {
  1318. clearInterval(daohang);
  1319. console.log('functionx.js 引用成功,等待生效...')
  1320. }
  1321. }, 500);
  1322. }
  1323. }
  1324.  
  1325. // 按根据父元素是否包含子元素而删除父元素
  1326. function remove_parentElement_by_child(parentElement, child) {
  1327. let remove_parentElement_by_child_interval = setInterval(() => {
  1328. if (document.querySelector(parentElement + ">" + child)) {
  1329. document.querySelectorAll(parentElement).forEach((x) => {
  1330. if (x.querySelector(child)) {
  1331. x.remove();
  1332. clearInterval(remove_parentElement_by_child_interval);
  1333. }
  1334. })
  1335. }
  1336. }, 1000)
  1337. }
  1338.  
  1339. // 无数函数及方法的组合使脚本更灵活
  1340. // 自动跳过 pornhub interstitial 插页式广告
  1341. function pornhub_interstitialPass() {
  1342. const ele_skip = "[onclick*='clearModalCookie']"
  1343. const exist = document.querySelectorAll(ele_skip);
  1344. if (document.querySelectorAll(ele_skip).length > 0) {
  1345. const href = exist[1].href;
  1346. window.location = href;
  1347. }
  1348. }
  1349.  
  1350. // 设置 cookie // 18comic Javascript
  1351. function _18comic_adsRemove() {
  1352. document.cookie = "cover=1";
  1353. document.cookie = "shunt=1";
  1354. document.cookie = "guide=1";
  1355. }
  1356.  
  1357. // 设置 cookie // missAv Javascript
  1358. function missAv_adsRemove() {
  1359. document.cookie = "_gat_UA-177787578-7; expires=Thu, 01 Jan 1970 00:00:00 GMT";
  1360. }
  1361.  
  1362. // 设置 Cookie // 任意
  1363. function set_cookie(name, value) {
  1364. document.cookie = name + '=' + value + '; Path=/;';
  1365. }
  1366.  
  1367. // 通过CSS选择器隐藏广告样式
  1368. function selector_adsRemove(selector, time) {
  1369. var i;
  1370. setTimeout(() => {
  1371. var nodelists = document.querySelectorAll(selector)
  1372. for (i = 0; i < nodelists.length; i++) {
  1373. //nodelists[i].remove();
  1374. nodelists[i].style = "display: none !important;"
  1375. }
  1376. }, time)
  1377. }
  1378.  
  1379.  
  1380.  
  1381. // 设置 cookie 并移除特定元素
  1382. function jable_adsRemove() { // Cookie 设定及注入
  1383. document.cookie = "ts_popunder=1";
  1384. document.cookie = "kt_tcookie=1";
  1385. document.cookie = "asgsc262182=2";
  1386. var adsDomain = [
  1387. 'r.trwl1.com',
  1388. 'r.www.com'
  1389. ];
  1390.  
  1391.  
  1392. const div = document.querySelectorAll("div.col-6.col-sm-4.col-lg-3, div.col-6.col-sm-4.col-xl-3, div.col-6.col-sm-4.col-lg-12")
  1393. for (x = 0; x < div.length; x++) {
  1394. if (div[x].querySelectorAll("script, a[href*=trackwilltrk]").length >= 1) {
  1395. div[x].style = "display: none !important; pointer-events: none !important;"
  1396. }
  1397. }
  1398. }
  1399.  
  1400. // 移除 某个 tag标签
  1401. function tag_adsRemove(tagname, keyword) {
  1402. var i;
  1403. var tag = document.getElementsByTagName(tagname);
  1404. for (i = 0; i < tag.length; i++) {
  1405. if (tag[i].src.indexOf(keyword) !== -1) {
  1406. tag[i].remove()
  1407. }
  1408. if (tag[i].innerHTML.indexOf(keyword) !== -1) {
  1409. tag[i].remove()
  1410. }
  1411. }
  1412. }
  1413.  
  1414. // 在页面动态插入元素并赋予相应元素
  1415.  
  1416. function ele_dynamicAppend(selector, attribute, txt, style, func, id, array, tag) {
  1417. let new_ele = document.createElement(tag);
  1418. new_ele.innerHTML = txt;
  1419. new_ele.setAttribute(attribute, func);
  1420. new_ele.setAttribute("id", id);
  1421. new_ele.setAttribute("style", style);
  1422. var here = document.querySelectorAll(selector);
  1423. if (here.length > 0) {
  1424. here[0].insertBefore(new_ele, here[0].childNodes[array])
  1425. //here[0].appendChild(new_ele);
  1426. console.log("按钮已添加")
  1427. }
  1428. }
  1429.  
  1430.  
  1431. // Cloudflare recaptcha 绕过
  1432. function cloudflare_captchaBypass() {
  1433. var title = document.title;
  1434. if (title.search("Cloudflare") !== -1 || title.search("Attention") !== -1) {
  1435. window.location.reload();
  1436. console.log("captchaBypass done;")
  1437. };
  1438. }
  1439.  
  1440.  
  1441. // missav 广告移除后导致的空白
  1442. function div_ad_missav() {
  1443. let div_ad = document.querySelectorAll('div.mx-auto[style]')
  1444. for (i = 0; i < div_ad.length; i++) {
  1445. if (div_ad[i].querySelectorAll('[target=\'_blank\']').length >= 1) {
  1446. div_ad[i].style.height = '0px'
  1447. }
  1448. }
  1449. }
  1450.  
  1451. /* 循环播放 missAV */
  1452.  
  1453. var timer = null;
  1454. var timerlist = [];
  1455.  
  1456. function video_loopPlay(x) {
  1457. if (x === 'loop') {
  1458. intval = window.setInterval(missAv_playbutton, 1000)
  1459. } else if (x === 'pause') {
  1460. if (intval) {
  1461. timerlist.forEach((item, index) => { // 清理监听事件移除
  1462. clearInterval(item);
  1463. })
  1464. video_pause();
  1465. }
  1466. }
  1467. }
  1468.  
  1469. function missAv_playbutton() {
  1470. timerlist.push(intval);
  1471. var ele_catch = document.querySelectorAll("video[preload='none'],video#player");
  1472. if (ele_catch.length > 0) {
  1473. ele_catch[0].play();
  1474. //ele_catch[1].play();
  1475. //console.log("视频已开启循环播放;")
  1476. }
  1477. }
  1478.  
  1479.  
  1480. /* 播放 */
  1481. function window_play() {
  1482. window.player.play()
  1483. }
  1484.  
  1485. /* 播放 */
  1486. function video_Play() {
  1487. //setInterval(function () {
  1488. var ele = ["video[preload='none'],video#player"];
  1489. var ele_catch = document.querySelectorAll(ele);
  1490. if (ele_catch.length > 0) {
  1491. ele_catch[0].play();
  1492. ele_catch[1].play();
  1493. console.log("视频已开始播放;")
  1494. }
  1495. //}, 1000)
  1496. }
  1497.  
  1498. /* 全屏 */
  1499. function fullscreen() {
  1500. const fullScreen = document.querySelector('button[data-plyr=\'fullscreen\']');
  1501. fullScreen.click()
  1502. //fullScreen.requestFullscreen();
  1503. //const fullScreen = document.querySelector('div.plyr__video-wrapper');
  1504. //fullScreen.requestFullscreen();
  1505. }
  1506.  
  1507. /* 全屏 */
  1508. function fullscreen_backup() {
  1509. //setInterval(function () {
  1510. var ele = [".plyr--fullscreen-enabled [data-plyr=fullscreen]"];
  1511. var ele_catch = document.querySelectorAll(ele);
  1512. if (ele_catch.length > 0) {
  1513. ele_catch[0].click();
  1514. //ele_catch[1].click();
  1515. console.log("视频已全屏;")
  1516. }
  1517. //}, 1000)
  1518. }
  1519.  
  1520. /* 暂停 */
  1521. function window_pause() {
  1522. window.player.pause()
  1523. }
  1524.  
  1525. /* 暂停 */
  1526. function video_pause() {
  1527. //setInterval(function () {
  1528. var ele = ["video[preload='none'],video#player"];
  1529. var ele_catch = document.querySelectorAll(ele);
  1530. if (ele_catch.length > 0) {
  1531. ele_catch[0].pause();
  1532. ele_catch[1].pause();
  1533. console.log("视频已暂停;")
  1534. }
  1535. //}, 1000)
  1536. }
  1537.  
  1538. /* 延后播放 */
  1539. function video_delayPlay(time) {
  1540. setTimeout(function () {
  1541. var ele = ["video[preload='none'],video#player"];
  1542. var ele_catch = document.querySelector(ele);
  1543. if (ele_catch) {
  1544. ele_catch.play()
  1545. console.log("视频已延后播放;")
  1546. }
  1547. }, time)
  1548. }
  1549.  
  1550. /* 添加监听器 bySelector*/
  1551. function addListener(selector, funx) {
  1552. setTimeout(() => {
  1553. var ele = document.querySelectorAll(selector);
  1554. for (let index = 0; index < ele.length; index++) {
  1555. ele[index].addEventListener("click", funx, false)
  1556. }
  1557. }, 1000)
  1558. }
  1559.  
  1560. /* 添加监听器 byID */
  1561. function addListenerById(id, funx, time) {
  1562. setTimeout(() => {
  1563. if (document.getElementById(id) !== null) {
  1564. var eleById = document.getElementById(id);
  1565. eleById.addEventListener("click", funx, false)
  1566. }
  1567. }, time)
  1568. }
  1569.  
  1570.  
  1571. function loopq() {
  1572. alert("Got it!")
  1573. }
  1574.  
  1575. /* 添加属性 */
  1576. function setAttribute_after(x, y) {
  1577. var index;
  1578. var ele = document.querySelectorAll(x)
  1579. for (index = 0; index < ele.length; index++) {
  1580. ele[index].setAttribute("onclick", y);
  1581. console.log("属性设置中...");
  1582. }
  1583. }
  1584.  
  1585. /* 低端影视是否显示图像 */
  1586. function cheat() {
  1587. var ele = document.getElementById("holyx");
  1588. ele.innerHTML = imax.css.ddrk_cheat;
  1589. setTimeout(() => {
  1590. ele.innerHTML = imax.css.ddrk_hidden;
  1591. console.log("正在切换剧集;")
  1592. }, 150);
  1593. }
  1594.  
  1595. // 禁止新页面跳转
  1596. function hrefAttribute_set() {
  1597. var href = document.querySelectorAll("a");
  1598. var i;
  1599. if (href.length > 0) {
  1600. console.log("新标签页打开链接已被禁止;")
  1601. for (i = 0; i < href.length; i++) {
  1602. href[i].target = "_self";
  1603. }
  1604. }
  1605. }
  1606.  
  1607. // 禁止新页面跳转另一种实现 循环
  1608. function href_attributeSet(time, id) {
  1609. document.getElementById(id).style.background = "black";
  1610. document.getElementById(id).innerHTML = "清理中! ♻️";
  1611. setTimeout(() => {
  1612. // 监控页面是否有新的 button
  1613. let selector = "button[class*='Button PaginationButton']";
  1614. let ele_button = document.querySelectorAll(selector);
  1615. if (ele_button.length > 0) {
  1616. window.onload = addListener(selector, () => { href_attributeSet(time, id) });
  1617. }
  1618. let times = 0;
  1619. let loop = setInterval(() => {
  1620. // 修改属性
  1621. times += 1;
  1622. let href = document.querySelectorAll("a");
  1623. let i;
  1624. for (i = 0; i < href.length; i++) {
  1625. if (href[i].target == "_blank") {
  1626. href[i].setAttribute("target", "_self");
  1627. }
  1628. }
  1629. let href_Length = document.querySelectorAll("a[target='_blank']").length;
  1630. if (href_Length === 0 && times >= 2) {
  1631. clearInterval(loop);
  1632. if (document.getElementById(id)) {
  1633. document.getElementById(id).innerHTML = "100%! ♻️";
  1634. document.getElementById(id).style.background = "green";
  1635. console.log("循环第" + times + "遍;")
  1636. console.log("清理完毕!");
  1637. }
  1638. }
  1639. }, time)
  1640. }, time)
  1641. }
  1642.  
  1643. // 动态创建引用外部js JavaScript
  1644. function js_adsRemove(url) {
  1645. var script = document.createElement("script");
  1646. script.src = url;
  1647. document.body.appendChild(script);
  1648. console.log("JavaScript脚本新增完毕!");
  1649. }
  1650.  
  1651.  
  1652. // 动态创建并引用外部资源 外部样式表 外部脚本
  1653. function third_party_fileX(tagname, url, where) {
  1654. var ele_NewX = document.createElement(tagname);
  1655. // script
  1656. if (tagname == "script") {
  1657. ele_NewX.type = "text/javascript";
  1658. ele_NewX.src = url;
  1659. ele_NewX.className = 'async';
  1660. // link
  1661. } else if (tagname == "link") {
  1662. ele_NewX.rel = "stylesheet";
  1663. ele_NewX.type = "text/css";
  1664. ele_NewX.href = url;
  1665. }
  1666.  
  1667. setTimeout(() => {
  1668. if (where == "body" && ele_NewX) {
  1669. if (document.body) {
  1670. document.body.appendChild(ele_NewX);
  1671. }
  1672. } else if (where == "head" && ele_NewX) {
  1673. if (document.head) {
  1674. document.head.appendChild(ele_NewX);
  1675. }
  1676. }
  1677. }, 1000)
  1678. }
  1679.  
  1680.  
  1681. // 动态创建引用内部资源 内嵌式样式 内嵌式脚本
  1682. function css_adsRemove(newstyle, delaytime, id) {
  1683. setTimeout(() => {
  1684. var creatcss = document.createElement("style");
  1685. creatcss.id = id;
  1686. creatcss.innerHTML = newstyle;
  1687. document.getElementsByTagName('head')[0].appendChild(creatcss)
  1688. console.log("CSS样式新增完毕!");
  1689. }, delaytime);
  1690. }
  1691.  
  1692. // 循环模拟模拟点击
  1693. function button_dynamicRemove(selector, times) {
  1694. var initCount = 0;
  1695. var loop = setInterval(() => {
  1696. var ele = document.querySelectorAll(selector);
  1697. if (ele.length > 0) {
  1698. ele[0].click()
  1699. }
  1700. initCount += 1;
  1701. if (initCount == times) {
  1702. clearInterval(loop);
  1703. }
  1704. }, 0)
  1705. }
  1706.  
  1707. // 知乎循环跳转绕过登录页
  1708. function indexLogin() { // 跳转至热门话题 Explore 或 随机
  1709. let url = document.location.href;
  1710. let cssSelector = "a[href='//www.zhihu.com/'],a[href='//www.zhihu.com'],a[href='https://www.zhihu.com']";
  1711. let rewrite_url = "https://www.zhihu.com/knowledge-plan/hot-question/hot/0/hour";
  1712. let reg = /^https:\/\/www.zhihu.com\/signin/gi;
  1713. if (url.search(reg) !== -1) {
  1714. window.location = rewrite_url;
  1715. }
  1716.  
  1717. setTimeout(() => { // 延时执行函数优化
  1718. var ele = document.querySelectorAll(cssSelector)
  1719. if (ele.length > 0) {
  1720. let i;
  1721. for (i = 0; i < ele.length; i++) {
  1722. ele[i].href = rewrite_url;
  1723. }
  1724. }
  1725. }, 300);
  1726.  
  1727. /*
  1728. var url = document.location.href;
  1729. var url_list = [
  1730. "https://www.zhihu.com/knowledge-plan/hot-question/hot/",
  1731. ]
  1732. var rand = Math.floor(Math.random() * url_list.length);
  1733. var url_random = url_list[rand];
  1734. var reg = /^https:\/\/www.zhihu.com\/signin/gi;
  1735. if (url.search(reg) !== -1) {
  1736. window.location = url_random;
  1737. }
  1738. */
  1739. }
  1740.  
  1741.  
  1742. /// abort-on-property-read.js
  1743. /// alias aopr.js
  1744. /// https://github.com/gorhill/uBlock/blob/a94df7f3b27080ae2dcb3b914ace39c0c294d2f6/assets/resources/scriptlets.js#L96
  1745. function abort_on_property_read() {
  1746. const magic = String.fromCharCode(Date.now() % 26 + 97) +
  1747. Math.floor(Math.random() * 982451653 + 982451653).toString(36);
  1748. const abort = function () {
  1749. throw new ReferenceError(magic);
  1750. };
  1751. const makeProxy = function (owner, chain) {
  1752. const pos = chain.indexOf('.');
  1753. if (pos === -1) {
  1754. const desc = Object.getOwnPropertyDescriptor(owner, chain);
  1755. if (!desc || desc.get !== abort) {
  1756. Object.defineProperty(owner, chain, {
  1757. get: abort,
  1758. set: function () { }
  1759. });
  1760. }
  1761. return;
  1762. }
  1763. const prop = chain.slice(0, pos);
  1764. let v = owner[prop];
  1765. chain = chain.slice(pos + 1);
  1766. if (v) {
  1767. makeProxy(v, chain);
  1768. return;
  1769. }
  1770. const desc = Object.getOwnPropertyDescriptor(owner, prop);
  1771. if (desc && desc.set !== undefined) { return; }
  1772. Object.defineProperty(owner, prop, {
  1773. get: function () { return v; },
  1774. set: function (a) {
  1775. v = a;
  1776. if (a instanceof Object) {
  1777. makeProxy(a, chain);
  1778. }
  1779. }
  1780. });
  1781. };
  1782. const owner = window;
  1783. let chain = '{{1}}';
  1784. makeProxy(owner, chain);
  1785. const oe = window.onerror;
  1786. window.onerror = function (msg, src, line, col, error) {
  1787. if (typeof msg === 'string' && msg.indexOf(magic) !== -1) {
  1788. return true;
  1789. }
  1790. if (oe instanceof Function) {
  1791. return oe(msg, src, line, col, error);
  1792. }
  1793. }.bind();
  1794. };
  1795.  
  1796. /* 视频页广告加速跳过 */
  1797. function videoAds_accelerateSkip(fasterx) {
  1798. // https://github.com/gorhill/uBlock/wiki
  1799. /// nano-setInterval-booster.js
  1800. /// alias nano-sib.js
  1801. //console.log("视频广告加速")
  1802. let needleArg = '{{1}}';
  1803. if (needleArg === '{{1}}') { needleArg = ''; }
  1804. let delayArg = '{{2}}';
  1805. if (delayArg === '{{2}}') { delayArg = ''; }
  1806. let boostArg = '{{3}}';
  1807. if (boostArg === '{{3}}') { boostArg = ''; }
  1808. if (needleArg === '') {
  1809. needleArg = '.?';
  1810. } else if (needleArg.charAt(0) === '/' && needleArg.slice(-1) === '/') {
  1811. needleArg = needleArg.slice(1, -1);
  1812. } else {
  1813. needleArg = needleArg.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
  1814. }
  1815. const reNeedle = new RegExp(needleArg);
  1816. let delay = delayArg !== '*' ? parseInt(delayArg, 10) : -1;
  1817. if (isNaN(delay) || isFinite(delay) === false) { delay = 1000; }
  1818. let boost = parseFloat(boostArg);
  1819. boost = isNaN(boost) === false && isFinite(boost)
  1820. ? Math.min(Math.max(boost, fasterx), 50)
  1821. : fasterx;
  1822. self.setInterval = new Proxy(self.setInterval, {
  1823. apply: function (target, thisArg, args) {
  1824. const [a, b] = args;
  1825. if (
  1826. (delay === -1 || b === delay) &&
  1827. reNeedle.test(a.toString())
  1828. ) {
  1829. args[1] = b * boost;
  1830. }
  1831. return target.apply(thisArg, args);
  1832. }
  1833. });
  1834. };
  1835.  
  1836. // overridePropertyRead 覆盖属性读取
  1837. /// https://github.com/AdguardTeam/Scriptlets/blob/master/wiki/about-scriptlets.md#set-constant
  1838.  
  1839. var repeat_regex = ["https:?\/\/.*?hls.*?\.m3u8", "https:?\/\/.*?phncdn.*?hls.*?\.m3u8", "https:?\/\/.*?mushroomtrack.*?\.m3u8"]
  1840.  
  1841. function m3u8_tempt(x) {
  1842. var i, url_result; var url_regex = new RegExp(x, "gi")
  1843. var ele = ["script", "a"];
  1844. var ele_catch = document.querySelectorAll(ele);
  1845. for (i = 0; i < ele_catch.length; i++) {
  1846. if ((url_result = url_regex.exec(ele_catch[i].innerHTML)) != null) {
  1847. document.getElementById("copy").value = url_result;
  1848. console.log("Catch it")
  1849. }
  1850. }
  1851. }
  1852.  
  1853. function pornhub_sidebar_ads() {
  1854. setTimeout(() => {
  1855. var ele_parent = ["div"];
  1856. var ele_children = ["img[data-title][title][srcset]"];
  1857. var ele_attributes = ["class"];
  1858. var i;
  1859.  
  1860. const css_Selctors = document.querySelectorAll(ele_parent);
  1861.  
  1862. for (i = 0; i < css_Selctors.length; i++) {
  1863. if (css_Selctors[i].querySelectorAll(ele_children).length !== 0) {
  1864. if (css_Selctors[i].getAttribute(ele_attributes)) {
  1865. if (css_Selctors[i].attributes.length == 1) {
  1866. if (css_Selctors[i].children.length == 2) {
  1867. console.log(css_Selctors[i])
  1868. css_Selctors[i].style.display = "none";
  1869. }
  1870. }
  1871. }
  1872. }
  1873. }
  1874. }, 500);
  1875. }
  1876.  
  1877.  
  1878. function tag_ads_traversal(selector, i) {
  1879. const css_Selctors = document.querySelectorAll(selector)
  1880. css_Selctors[i].style.display = "none";
  1881. }
  1882.  
  1883. // Get Cookies 获取指定命名的cookie 的值
  1884. function getCookie_(cname) {
  1885. var name = cname + "=";
  1886. var ca = document.cookie.split(';');
  1887. for (var i = 0; i < ca.length; i++) {
  1888. var c = ca[i].trim();
  1889. if (c.indexOf(name) == 0) return c.substring(name.length, c.length);
  1890. }
  1891. return "";
  1892. }
  1893.  
  1894. // 哔滴影视隐藏公告广告
  1895. function notice_hidden(selector) { // bdys
  1896. document.querySelector(selector).classList.add("switch") // 隐藏公告
  1897. document.cookie = "hidden=1";
  1898. document.getElementById("bdys").innerHTML = "查看公告";
  1899. addListenerById("bdys", () => { notice_show("div.col-12") }, 2000);
  1900. }
  1901.  
  1902. // 哔滴影视展示公告
  1903. function notice_show(selector) {
  1904. document.querySelector(selector).classList.remove("switch") // 展示公告
  1905. document.cookie = "hidden=0";
  1906. document.getElementById("bdys").innerHTML = "隐藏公告";
  1907. addListenerById("bdys", () => { notice_hidden("div.col-12") }, 2000);
  1908. }
  1909.  
  1910.  
  1911.  
  1912. // window.open-defuser.js
  1913. // https://github.com/gorhill/uBlock/wiki/Resources-Library#windowopen-defuserjs-
  1914.  
  1915. function window_open_defuser() {
  1916. 'use strict';
  1917. let arg1 = '{{1}}';
  1918. if (arg1 === '{{1}}') { arg1 = ''; }
  1919. let arg2 = '{{2}}';
  1920. if (arg2 === '{{2}}') { arg2 = ''; }
  1921. let arg3 = '{{3}}';
  1922. if (arg3 === '{{3}}') { arg3 = ''; }
  1923. const log = /\blog\b/.test(arg3)
  1924. ? console.log.bind(console)
  1925. : () => { };
  1926. const newSyntax = /^[01]?$/.test(arg1) === false;
  1927. let pattern = '';
  1928. let targetResult = true;
  1929. let autoRemoveAfter = -1;
  1930. if (newSyntax) {
  1931. pattern = arg1;
  1932. if (pattern.startsWith('!')) {
  1933. targetResult = false;
  1934. pattern = pattern.slice(1);
  1935. }
  1936. autoRemoveAfter = parseInt(arg2);
  1937. if (isNaN(autoRemoveAfter)) {
  1938. autoRemoveAfter = -1;
  1939. }
  1940. } else {
  1941. pattern = arg2;
  1942. if (arg1 === '0') {
  1943. targetResult = false;
  1944. }
  1945. }
  1946. if (pattern === '') {
  1947. pattern = '.?';
  1948. } else if (/^\/.+\/$/.test(pattern)) {
  1949. pattern = pattern.slice(1, -1);
  1950. } else {
  1951. pattern = pattern.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
  1952. }
  1953. const rePattern = new RegExp(pattern);
  1954. const createDecoy = function (tag, urlProp, url) {
  1955. const decoy = document.createElement(tag);
  1956. decoy[urlProp] = url;
  1957. decoy.style.setProperty('height', '1px', 'important');
  1958. decoy.style.setProperty('position', 'fixed', 'important');
  1959. decoy.style.setProperty('top', '-1px', 'important');
  1960. decoy.style.setProperty('width', '1px', 'important');
  1961. document.body.appendChild(decoy);
  1962. setTimeout(() => decoy.remove(), autoRemoveAfter * 1000);
  1963. return decoy;
  1964. };
  1965. window.open = new Proxy(window.open, {
  1966. apply: function (target, thisArg, args) {
  1967. log('window.open:', ...args);
  1968. const url = args[0];
  1969. if (rePattern.test(url) !== targetResult) {
  1970. return target.apply(thisArg, args);
  1971. }
  1972. if (autoRemoveAfter < 0) { return null; }
  1973. const decoy = /\bobj\b/.test(arg3)
  1974. ? createDecoy('object', 'data', url)
  1975. : createDecoy('iframe', 'src', url);
  1976. let popup = decoy.contentWindow;
  1977. if (typeof popup === 'object' && popup !== null) {
  1978. Object.defineProperty(popup, 'closed', { value: false });
  1979. } else {
  1980. const noopFunc = (function () { }).bind(self);
  1981. popup = new Proxy(self, {
  1982. get: function (target, prop) {
  1983. if (prop === 'closed') { return false; }
  1984. const r = Reflect.get(...arguments);
  1985. if (typeof r === 'function') { return noopFunc; }
  1986. return target[prop];
  1987. },
  1988. set: function () {
  1989. return Reflect.set(...arguments);
  1990. },
  1991. });
  1992. }
  1993. if (/\blog\b/.test(arg3)) {
  1994. popup = new Proxy(popup, {
  1995. get: function (target, prop) {
  1996. log('window.open / get', prop, '===', target[prop]);
  1997. return Reflect.get(...arguments);
  1998. },
  1999. set: function (target, prop, value) {
  2000. log('window.open / set', prop, '=', value);
  2001. return Reflect.set(...arguments);
  2002. },
  2003. });
  2004. }
  2005. return popup;
  2006. }
  2007. });
  2008. };
  2009.  
  2010. /* 广告视频加速 */
  2011. function setConstant(
  2012. chain = '',
  2013. cValue = ''
  2014. ) {
  2015. if (typeof chain !== 'string') { return; }
  2016. if (chain === '') { return; }
  2017. const trappedProp = (() => {
  2018. const pos = chain.lastIndexOf('.');
  2019. if (pos === -1) { return chain; }
  2020. return chain.slice(pos + 1);
  2021. })();
  2022. if (trappedProp === '') { return; }
  2023. const thisScript = document.currentScript;
  2024. const objectDefineProperty = Object.defineProperty.bind(Object);
  2025. const cloakFunc = fn => {
  2026. objectDefineProperty(fn, 'name', { value: trappedProp });
  2027. const proxy = new Proxy(fn, {
  2028. defineProperty(target, prop) {
  2029. if (prop !== 'toString') {
  2030. return Reflect.deleteProperty(...arguments);
  2031. }
  2032. return true;
  2033. },
  2034. deleteProperty(target, prop) {
  2035. if (prop !== 'toString') {
  2036. return Reflect.deleteProperty(...arguments);
  2037. }
  2038. return true;
  2039. },
  2040. get(target, prop) {
  2041. if (prop === 'toString') {
  2042. return function () {
  2043. return `function ${trappedProp}() { [native code] }`;
  2044. }.bind(null);
  2045. }
  2046. return Reflect.get(...arguments);
  2047. },
  2048. });
  2049. return proxy;
  2050. };
  2051. if (cValue === 'undefined') {
  2052. cValue = undefined;
  2053. } else if (cValue === 'false') {
  2054. cValue = false;
  2055. } else if (cValue === 'true') {
  2056. cValue = true;
  2057. } else if (cValue === 'null') {
  2058. cValue = null;
  2059. } else if (cValue === "''") {
  2060. cValue = '';
  2061. } else if (cValue === '[]') {
  2062. cValue = [];
  2063. } else if (cValue === '{}') {
  2064. cValue = {};
  2065. } else if (cValue === 'noopFunc') {
  2066. cValue = cloakFunc(function () { });
  2067. } else if (cValue === 'trueFunc') {
  2068. cValue = cloakFunc(function () { return true; });
  2069. } else if (cValue === 'falseFunc') {
  2070. cValue = cloakFunc(function () { return false; });
  2071. } else if (/^\d+$/.test(cValue)) {
  2072. cValue = parseFloat(cValue);
  2073. if (isNaN(cValue)) { return; }
  2074. if (Math.abs(cValue) > 0x7FFF) { return; }
  2075. } else {
  2076. return;
  2077. }
  2078. let aborted = false;
  2079. const mustAbort = function (v) {
  2080. if (aborted) { return true; }
  2081. aborted =
  2082. (v !== undefined && v !== null) &&
  2083. (cValue !== undefined && cValue !== null) &&
  2084. (typeof v !== typeof cValue);
  2085. return aborted;
  2086. };
  2087. // https://github.com/uBlockOrigin/uBlock-issues/issues/156
  2088. // Support multiple trappers for the same property.
  2089. const trapProp = function (owner, prop, configurable, handler) {
  2090. if (handler.init(owner[prop]) === false) { return; }
  2091. const odesc = Object.getOwnPropertyDescriptor(owner, prop);
  2092. let prevGetter, prevSetter;
  2093. if (odesc instanceof Object) {
  2094. owner[prop] = cValue;
  2095. if (odesc.get instanceof Function) {
  2096. prevGetter = odesc.get;
  2097. }
  2098. if (odesc.set instanceof Function) {
  2099. prevSetter = odesc.set;
  2100. }
  2101. }
  2102. try {
  2103. objectDefineProperty(owner, prop, {
  2104. configurable,
  2105. get() {
  2106. if (prevGetter !== undefined) {
  2107. prevGetter();
  2108. }
  2109. return handler.getter(); // cValue
  2110. },
  2111. set(a) {
  2112. if (prevSetter !== undefined) {
  2113. prevSetter(a);
  2114. }
  2115. handler.setter(a);
  2116. }
  2117. });
  2118. } catch (ex) {
  2119. }
  2120. };
  2121. const trapChain = function (owner, chain) {
  2122. const pos = chain.indexOf('.');
  2123. if (pos === -1) {
  2124. trapProp(owner, chain, false, {
  2125. v: undefined,
  2126. init: function (v) {
  2127. if (mustAbort(v)) { return false; }
  2128. this.v = v;
  2129. return true;
  2130. },
  2131. getter: function () {
  2132. return document.currentScript === thisScript
  2133. ? this.v
  2134. : cValue;
  2135. },
  2136. setter: function (a) {
  2137. if (mustAbort(a) === false) { return; }
  2138. cValue = a;
  2139. }
  2140. });
  2141. return;
  2142. }
  2143. const prop = chain.slice(0, pos);
  2144. const v = owner[prop];
  2145. chain = chain.slice(pos + 1);
  2146. if (v instanceof Object || typeof v === 'object' && v !== null) {
  2147. trapChain(v, chain);
  2148. return;
  2149. }
  2150. trapProp(owner, prop, true, {
  2151. v: undefined,
  2152. init: function (v) {
  2153. this.v = v;
  2154. return true;
  2155. },
  2156. getter: function () {
  2157. return this.v;
  2158. },
  2159. setter: function (a) {
  2160. this.v = a;
  2161. if (a instanceof Object) {
  2162. trapChain(a, chain);
  2163. }
  2164. }
  2165. });
  2166. };
  2167. trapChain(window, chain);
  2168. }
  2169.  
  2170. // 泥巴影视手机版视频播放前20秒广告跳过 nbys nivod4
  2171. // https://github.com/AdguardTeam/AdguardFilters/issues/146359
  2172.  
  2173. function evaldataPrune() {
  2174. window.eval = new Proxy(eval, {
  2175. apply: (a, b, c) => {
  2176. if (c[0] && c[0].includes("commercial") && c[0].startsWith("(") && c[0].endsWith(")")) { let a = c[0].slice(1).slice(0, -1), b = JSON.parse(a); b.entity?.commercial && (b.entity.commercial = void 0), c[0] = `(${JSON.stringify(b)})` }
  2177. return Reflect.apply(a, b, c)
  2178. }
  2179. })
  2180. };
  2181.  
  2182. /// abort-current-script.js
  2183. /// alias acs.js
  2184. /// alias abort-current-inline-script.js
  2185. /// alias acis.js
  2186.  
  2187. function abortCurrentInlineScript(source, property, search) {
  2188. const searchRegexp = toRegExp(search);
  2189. const rid = randomId();
  2190.  
  2191. const SRC_DATA_MARKER = 'data:text/javascript;base64,';
  2192.  
  2193. const getCurrentScript = () => {
  2194. if ('currentScript' in document) {
  2195. return document.currentScript;
  2196. }
  2197. const scripts = document.getElementsByTagName('script');
  2198. return scripts[scripts.length - 1];
  2199. };
  2200.  
  2201. const ourScript = getCurrentScript();
  2202.  
  2203. const abort = () => {
  2204. const scriptEl = getCurrentScript();
  2205. if (!scriptEl) {
  2206. return;
  2207. }
  2208. let content = scriptEl.textContent;
  2209.  
  2210. // We are using Node.prototype.textContent property descriptor
  2211. // to get the real script content
  2212. // even when document.currentScript.textContent is replaced.
  2213. // https://github.com/AdguardTeam/Scriptlets/issues/57#issuecomment-593638991
  2214.  
  2215. try {
  2216. const textContentGetter = Object.getOwnPropertyDescriptor(Node.prototype, 'textContent').get;
  2217. content = textContentGetter.call(scriptEl);
  2218. } catch (e) { } // eslint-disable-line no-empty
  2219.  
  2220. // https://github.com/AdguardTeam/Scriptlets/issues/130
  2221. if (content.length === 0
  2222. && typeof scriptEl.src !== 'undefined'
  2223. && scriptEl.src?.startsWith(SRC_DATA_MARKER)) {
  2224. const encodedContent = scriptEl.src.slice(SRC_DATA_MARKER.length);
  2225. content = window.atob(encodedContent);
  2226. }
  2227.  
  2228. if (scriptEl instanceof HTMLScriptElement
  2229. && content.length > 0
  2230. && scriptEl !== ourScript
  2231. && searchRegexp.test(content)) {
  2232. hit(source);
  2233. throw new ReferenceError(rid);
  2234. }
  2235. };
  2236.  
  2237. const setChainPropAccess = (owner, property) => {
  2238. const chainInfo = getPropertyInChain(owner, property);
  2239. let { base } = chainInfo;
  2240. const { prop, chain } = chainInfo;
  2241.  
  2242. // The scriptlet might be executed before the chain property has been created
  2243. // (for instance, document.body before the HTML body was loaded).
  2244. // In this case we're checking whether the base element exists or not
  2245. // and if not, we simply exit without overriding anything.
  2246. // e.g. https://github.com/AdguardTeam/Scriptlets/issues/57#issuecomment-575841092
  2247.  
  2248. if (base instanceof Object === false && base === null) {
  2249. const props = property.split('.');
  2250. const propIndex = props.indexOf(prop);
  2251. const baseName = props[propIndex - 1];
  2252.  
  2253. const message = `The scriptlet had been executed before the ${baseName} was loaded.`;
  2254. logMessage(source, message);
  2255. return;
  2256. }
  2257.  
  2258. if (chain) {
  2259. const setter = (a) => {
  2260. base = a;
  2261. if (a instanceof Object) {
  2262. setChainPropAccess(a, chain);
  2263. }
  2264. };
  2265. Object.defineProperty(owner, prop, {
  2266. get: () => base,
  2267. set: setter,
  2268. });
  2269. return;
  2270. }
  2271.  
  2272. let currentValue = base[prop];
  2273. let origDescriptor = Object.getOwnPropertyDescriptor(base, prop);
  2274. if (origDescriptor instanceof Object === false
  2275. || origDescriptor.get instanceof Function === false) {
  2276. currentValue = base[prop];
  2277. origDescriptor = undefined;
  2278. }
  2279.  
  2280. const descriptorWrapper = Object.assign(getDescriptorAddon(), {
  2281. currentValue,
  2282. get() {
  2283. if (!this.isAbortingSuspended) {
  2284. this.isolateCallback(abort);
  2285. }
  2286. if (origDescriptor instanceof Object) {
  2287. return origDescriptor.get.call(base);
  2288. }
  2289. return this.currentValue;
  2290. },
  2291. set(newValue) {
  2292. if (!this.isAbortingSuspended) {
  2293. this.isolateCallback(abort);
  2294. }
  2295. if (origDescriptor instanceof Object) {
  2296. origDescriptor.set.call(base, newValue);
  2297. } else {
  2298. this.currentValue = newValue;
  2299. }
  2300. },
  2301. });
  2302.  
  2303. setPropertyAccess(base, prop, {
  2304. // Call wrapped getter and setter to keep isAbortingSuspended & isolateCallback values
  2305. get() {
  2306. return descriptorWrapper.get.call(descriptorWrapper);
  2307. },
  2308. set(newValue) {
  2309. descriptorWrapper.set.call(descriptorWrapper, newValue);
  2310. },
  2311. });
  2312. };
  2313.  
  2314. setChainPropAccess(window, property);
  2315.  
  2316. window.onerror = createOnErrorHandler(rid).bind();
  2317. }
  2318.  
  2319.  
  2320. // https://github.com/gorhill/uBlock/wiki/Resources-Library#addeventlistener-defuserjs-
  2321. function addEventListener_defuser() {
  2322. let needle1 = '{{1}}';
  2323. if (needle1 === '' || needle1 === '{{1}}') {
  2324. needle1 = '.?';
  2325. } else if (/^\/.+\/$/.test(needle1)) {
  2326. needle1 = needle1.slice(1, -1);
  2327. } else {
  2328. needle1 = needle1.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
  2329. }
  2330. needle1 = new RegExp(needle1);
  2331. let needle2 = '{{2}}';
  2332. if (needle2 === '' || needle2 === '{{2}}') {
  2333. needle2 = '.?';
  2334. } else if (/^\/.+\/$/.test(needle2)) {
  2335. needle2 = needle2.slice(1, -1);
  2336. } else {
  2337. needle2 = needle2.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
  2338. }
  2339. needle2 = new RegExp(needle2);
  2340. self.EventTarget.prototype.addEventListener = new Proxy(
  2341. self.EventTarget.prototype.addEventListener,
  2342. {
  2343. apply: function (target, thisArg, args) {
  2344. let type, handler;
  2345. try {
  2346. type = String(args[0]);
  2347. handler = String(args[1]);
  2348. } catch (ex) {
  2349. }
  2350. if (
  2351. needle1.test(type) === false ||
  2352. needle2.test(handler) === false
  2353. ) {
  2354. return target.apply(thisArg, args);
  2355. }
  2356. }
  2357. }
  2358. );
  2359. };
  2360.  
  2361. document.querySelectorAll('a').forEach((x) => {
  2362. x.innerHTML
  2363. })
  2364.  
  2365.  
  2366. // noWindowOpenIf
  2367. // https://github.com/gorhill/uBlock/wiki/Resources-Library#no-window-open-ifjs-
  2368. //noWindowOpenIf()
  2369. function noWindowOpenIf(
  2370. pattern = '',
  2371. delay = '',
  2372. decoy = ''
  2373. ) {
  2374. const safe = safeSelf();
  2375. const targetMatchResult = pattern.startsWith('!') === false;
  2376. if (targetMatchResult === false) {
  2377. pattern = pattern.slice(1);
  2378. }
  2379. const rePattern = safe.patternToRegex(pattern);
  2380. let autoRemoveAfter = parseInt(delay);
  2381. if (isNaN(autoRemoveAfter)) {
  2382. autoRemoveAfter = -1;
  2383. }
  2384. const extraArgs = safe.getExtraArgs(Array.from(arguments), 3);
  2385. const logLevel = shouldLog(extraArgs);
  2386. const createDecoy = function (tag, urlProp, url) {
  2387. const decoyElem = document.createElement(tag);
  2388. decoyElem[urlProp] = url;
  2389. decoyElem.style.setProperty('height', '1px', 'important');
  2390. decoyElem.style.setProperty('position', 'fixed', 'important');
  2391. decoyElem.style.setProperty('top', '-1px', 'important');
  2392. decoyElem.style.setProperty('width', '1px', 'important');
  2393. document.body.appendChild(decoyElem);
  2394. setTimeout(() => { decoyElem.remove(); }, autoRemoveAfter * 1000);
  2395. return decoyElem;
  2396. };
  2397. window.open = new Proxy(window.open, {
  2398. apply: function (target, thisArg, args) {
  2399. const haystack = args.join(' ');
  2400. if (logLevel) {
  2401. safe.uboLog('window.open:', haystack);
  2402. }
  2403. if (rePattern.test(haystack) !== targetMatchResult) {
  2404. return Reflect.apply(target, thisArg, args);
  2405. }
  2406. if (autoRemoveAfter < 0) { return null; }
  2407. const decoyElem = decoy === 'obj'
  2408. ? createDecoy('object', 'data', ...args)
  2409. : createDecoy('iframe', 'src', ...args);
  2410. let popup = decoyElem.contentWindow;
  2411. if (typeof popup === 'object' && popup !== null) {
  2412. Object.defineProperty(popup, 'closed', { value: false });
  2413. } else {
  2414. const noopFunc = (function () { }).bind(self);
  2415. popup = new Proxy(self, {
  2416. get: function (target, prop) {
  2417. if (prop === 'closed') { return false; }
  2418. const r = Reflect.get(...arguments);
  2419. if (typeof r === 'function') { return noopFunc; }
  2420. return target[prop];
  2421. },
  2422. set: function () {
  2423. return Reflect.set(...arguments);
  2424. },
  2425. });
  2426. }
  2427. if (logLevel) {
  2428. popup = new Proxy(popup, {
  2429. get: function (target, prop) {
  2430. safe.uboLog('window.open / get', prop, '===', target[prop]);
  2431. return Reflect.get(...arguments);
  2432. },
  2433. set: function (target, prop, value) {
  2434. safe.uboLog('window.open / set', prop, '=', value);
  2435. return Reflect.set(...arguments);
  2436. },
  2437. });
  2438. }
  2439. return popup;
  2440. }
  2441. });
  2442. }
  2443.  
  2444.  
  2445. /// abort-on-property-read.js
  2446. /// alias aopr.js
  2447. /// 当脚本尝试读取指定属性时中止脚本
  2448. /// https://github.com/AdguardTeam/Scriptlets/blob/master/wiki/about-scriptlets.md#abort-on-property-read
  2449.  
  2450. function aopr() {
  2451. const magic = String.fromCharCode(Date.now() % 26 + 97) +
  2452. Math.floor(Math.random() * 982451653 + 982451653).toString(36);
  2453. const abort = function () {
  2454. throw new ReferenceError(magic);
  2455. };
  2456. const makeProxy = function (owner, chain) {
  2457. const pos = chain.indexOf('.');
  2458. if (pos === -1) {
  2459. const desc = Object.getOwnPropertyDescriptor(owner, chain);
  2460. if (!desc || desc.get !== abort) {
  2461. Object.defineProperty(owner, chain, {
  2462. get: abort,
  2463. set: function () { }
  2464. });
  2465. }
  2466. return;
  2467. }
  2468. const prop = chain.slice(0, pos);
  2469. let v = owner[prop];
  2470. chain = chain.slice(pos + 1);
  2471. if (v) {
  2472. makeProxy(v, chain);
  2473. return;
  2474. }
  2475. const desc = Object.getOwnPropertyDescriptor(owner, prop);
  2476. if (desc && desc.set !== undefined) { return; }
  2477. Object.defineProperty(owner, prop, {
  2478. get: function () { return v; },
  2479. set: function (a) {
  2480. v = a;
  2481. if (a instanceof Object) {
  2482. makeProxy(a, chain);
  2483. }
  2484. }
  2485. });
  2486. };
  2487. const owner = window;
  2488. let chain = '{{1}}';
  2489. makeProxy(owner, chain);
  2490. const oe = window.onerror;
  2491. window.onerror = function (msg, src, line, col, error) {
  2492. if (typeof msg === 'string' && msg.indexOf(magic) !== -1) {
  2493. return true;
  2494. }
  2495. if (oe instanceof Function) {
  2496. return oe(msg, src, line, col, error);
  2497. }
  2498. }.bind();
  2499. };
  2500.  
  2501. // 设置 cookie 饼
  2502. function settingCookie(cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); var expires = "expires=" + d.toGMTString(); document.cookie = cname + "=" + cvalue + "; path=/;" + expires; }