2023-10-15 14:45:32 +02:00
|
|
|
// ==UserScript==
|
|
|
|
// @name Auto Skip YouTube Ads
|
|
|
|
// @version 1.0.0
|
|
|
|
// @description Speed up and skip YouTube ads automatically
|
|
|
|
// @author jso8910
|
|
|
|
// @match *://*.youtube.com/*
|
|
|
|
// @exclude *://*.youtube.com/subscribe_embed?*
|
|
|
|
// ==/UserScript==
|
|
|
|
setInterval(() => {
|
2024-03-09 13:38:38 +01:00
|
|
|
document.querySelector('.videoAdUiSkipButton,.ytp-ad-skip-button')?.click()
|
2023-10-15 14:45:32 +02:00
|
|
|
const ad = [...document.querySelectorAll('.ad-showing')][0];
|
|
|
|
if (ad) {
|
|
|
|
document.querySelector('video').playbackRate = 10;
|
|
|
|
}
|
2024-03-09 13:38:38 +01:00
|
|
|
setTimeout( () => {
|
|
|
|
document.querySelector('.videoAdUiSkipButton,.ytp-ad-skip-button')?.click()
|
|
|
|
}, 5000)
|
2023-10-15 14:45:32 +02:00
|
|
|
}, 50)
|