Sleazy Fork is available in English.

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