差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

life:娱乐:油猴脚本 [2023-12-26 14:02] – 创建 goldentianyalife:娱乐:油猴脚本 [2023-12-26 14:03] (当前版本) goldentianya
行 2: 行 2:
  
 ++++ 跳过油管广告 | ++++ 跳过油管广告 |
-<code | download+<code> 
-Insert_Code+// ==UserScript== 
 +// @name         自动跳过YouTube广告 
 +// @namespace    youtube 
 +// @version      1.0 
 +// @description  在YouTube网页上自动跳过广告 
 +// @author       Joey Gambler 
 +// @match        *://www.youtube.com/
 +// @grant        none 
 +// ==/UserScript== 
 + 
 +(function () { 
 +    'use strict'; 
 + 
 +    function skipAd() { 
 +        var skipButton = document.querySelector('.ytp-ad-text.ytp-ad-skip-button-text'); 
 +        if (skipButton) { 
 +            skipButton.click(); 
 +            console.log("点击跳过按钮"); 
 +        } 
 + 
 +        var sofortButton = document.querySelector('.ytp-ad-text.ytp-ad-preview-text-modern'); 
 + 
 +        if (sofortButton) { 
 +            sofortButton.click(); 
 +            console.log("点击即将播放"); 
 +        } 
 +    } 
 + 
 +    // 设置检测时间间隔 
 +    var timer = setInterval(skipAd, 1000); // 1000毫秒 = 1秒 
 +})();
 </code>  </code> 
 ++++ ++++
life/娱乐/油猴脚本.1703599369.txt.gz · 最后更改: 2023-12-26 14:02 由 goldentianya
回到顶部
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0