您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
(Chrome ONLY) Bypass all youtube ads including in video ads, skippable and non-skippable Ads
当前为
// ==UserScript== // @name Youtube Ad Cleaner(Include Non-Skippable Ads- works) // @namespace http://tampermonkey.net/ // @version 1.37 // @description (Chrome ONLY) Bypass all youtube ads including in video ads, skippable and non-skippable Ads // @author BjDanny // @run-at document-start // @match *://*.youtube.com/* // ==/UserScript== setInterval(killAd,1); var home; var myWin; var timer1; var timer2; var to1; var to2; window.addEventListener("load", checkHome); window.addEventListener("yt-navigate-start", checkHome); function fastHomeListener(){ if(document.getElementById('logo')){ document.getElementById('logo').addEventListener("click", fasterBackHome); console.log('fastHomeListener is activated'); }} function fasterBackHome(){ var ytplayer = document.getElementById("movie_player"); ytplayer.cancelPlayback(); console.log('Home logo is clicked'); window.location.href = 'https://www.youtube.com'; } function checkHome() { if(window.location.href !=='https://www.youtube.com/'){ timer1 = setInterval(KillNoSkipAd,1); timer2 = setInterval(killInVideoAd,1); to1 = setTimeout(cfmReload,2000); to2 = setTimeout(fastHomeListener, 1000); } else{ clearInterval(timer1); clearInterval(timer2); clearTimeout(to1); clearTimeout(to2); } } function killAd(){ if (document.getElementById("masthead-ad") !==null){ document.getElementById("masthead-ad").remove();} if (document.getElementById("player-ads") !==null){ document.getElementById("player-ads").remove();} if (document.getElementById("offer-module")!==null){ document.getElementById("offer-module").remove();} if (document.getElementById("pyv-watch-related-dest-url")!==null){ document.getElementById("pyv-watch-related-dest-url").remove();} if (document.getElementById('ytd-promoted-video-renderer')!==null){ document.getElementById('ytd-promoted-video-renderer').remove();} if (document.getElementsByClassName("videoAdUiRedesign")[0] !==undefined){ document.getElementsByClassName("video-stream").attr("src", "");} if (document.getElementsByTagName('ytd-promoted-sparkles-text-search-renderer')[0] !==null){ document.getElementsByTagName('ytd-promoted-sparkles-text-search-renderer')[0].remove(); }} function KillNoSkipAd(){ // console.log('timer1'); var ytplayer = document.getElementById("movie_player"); var VdoTime; try{ VdoTime = ytplayer.getCurrentTime(); var adChannelName = document.getElementsByClassName('ytp-title-channel-name')[0].text; if (document.getElementsByClassName('ad-showing') [0] !== undefined || adChannelName !==""){ console.log('skipped in-video ad'); ytplayer.cancelPlayback(); setTimeout(ytplayer.playVideo(), 1); setTimeout(function() {if (ytplayer.getCurrentTime() == VdoTime){location.reload(); fixLoop(); console.log('Reloaded again !!!');}}, 2000); } }catch(e){return;} } function cfmReload(){ var ytplayer = document.getElementById("movie_player"); try{ var pauseOrNot = document.querySelector('.ytp-play-button.ytp-button').getAttribute('title'); if (pauseOrNot == 'Pause (k)' && ytplayer.getCurrentTime() == 0){ location.reload(); fixLoop(); console.log('Skipped Preload Video Ad'); } else{console.log('No preload video Ad. Good !');}} catch(e){return;}} function killInVideoAd(){ // console.log('timer2'); try{ if (document.getElementsByClassName("video-ads")[0] !== undefined){ document.getElementsByClassName("video-ads")[0].remove(); console.log('Overlay ads - removed'); } }catch(e){return;} } function fixLoop(){ console.log('fixLoop is triggered'); myWin = window.open('', '_blank'); myWin.document.write("<script>function closeIt(){window.close();} window.onload=setTimeout(closeIt, 1000);<\/script><p>Skipping Ad ... auto close!!</p>"); myWin.focus(); }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址