-
-
Save cutiepoka/a9347c68bfcf29060926a8af46bb1701 to your computer and use it in GitHub Desktop.
// ==UserScript== | |
// @name youtube popup killer | |
// @namespace http://tampermonkey.net/ | |
// @version 0.3 | |
// @description try to take over the world! | |
// @author Selbereth | |
// @match https://*.youtube.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com | |
// @grant none | |
// ==/UserScript== | |
(function () { | |
window.debug = true; | |
if (debug) console.log("started"); | |
setInterval(() => { | |
if (!!popupFind()) { | |
if (debug) console.log("remove popup"); | |
const popup = popupFind() | |
console.log(popup) | |
popup.parentNode.removeChild(popup) | |
if (debug) console.log("resume video"); | |
//pauseFind().click() | |
if (debug) console.log("done "); | |
} | |
}, 1000); | |
})(); | |
function popupFind() { | |
return document.querySelector("body > ytd-app > ytd-popup-container"); | |
} | |
function pauseFind(){ | |
return document.querySelector("#movie_player > div.ytp-chrome-bottom > div.ytp-chrome-controls > div.ytp-left-controls > button"); | |
} |
can you exclude the share popup? because everytime i want to share the video, the popup didn't show
@vauxious
Friend, I made it so the "share" pop-up wouldn't disappear, but I myself used the solution that was recommended by @Eraze1102
I found it to be simpler
// ==UserScript==
// @name youtube popup killer
// @namespace http://tampermonkey.net/
// @version 0.3
// @description try to take over the world!
// @author Selbereth
// @match https://*.youtube.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant none
// ==/UserScript==
(function () {
const debug = true;
if (debug) console.log("started");
setInterval(() => {
try {
if (!!popupFind()) {
console.log('close addPopup');
if (debug) console.log("remove popup");
const popup = popupFind();
console.log(popup);
popup.parentNode.removeChild(popup);
if (debug) console.log("resume video");
pauseFind().click();
if (debug) console.log("done ");
}
} catch (error) {
console.error("Error in the interval:", error);
}
}, 1000);
})();
function popupFind() {
const targetPopup = document.querySelector("body > ytd-app > ytd-popup-container > tp-yt-paper-dialog");
const ignoredPopup1 = document.querySelector("body > ytd-app > ytd-popup-container > tp-yt-iron-dropdown");
const ignoredPopup2 = document.querySelector("body > ytd-app > ytd-popup-container > tp-yt-paper-dialog"); //sharePopup
if (ignoredPopup1 || ignoredPopup2) {
console.log('open ignoredPopup');
return null;
}
return targetPopup;
}
function pauseFind(){
return document.querySelector("#movie_player > div.ytp-chrome-bottom > div.ytp-chrome-controls > div.ytp-left-controls > button");
}
the solution in the Video still works, i dont know what yall mean by pop up ...
the solution in the Video still works, i dont know what yall mean by pop up ...
there is no vid my man, so share the secret knowledge if there is one
https://greasyfork.org/en/scripts/477864-youtube-anti-adblock-bypass-via-youtube-enhancer
use this + whitelist youtube on all the other adblockers
Made slight adjustments to the OP submission that reacts to DOM changes directly instead of polling for popups every second (similar to @PeterFuciik's submission, uses the MutationObserver), please find here:
https://gist.github.com/H3mul/54145fbfafe89a03c2ce24fdcb66a868
Hi, I have realized the scripts work when I use Tampermonkey in Google Chrome, but when I use Tampermonkey on Opera, it does not work as I have been an opera user for a long time. Can someone help me?
Hi, I have realized the scripts work when I use Tampermonkey in Google Chrome, but when I use Tampermonkey on Opera, it does not work as I have been an opera user for a long time. Can someone help me?
Ok, I fixed the problem. I disabled adblock by opera and ADblock Plus and used uBlockOrigin and Tampermonkey instead. I still get side ads, but not in the video like before. If I use Opera adblock, YouTube doesn't just block you by popup; they completely block the video and make it impossible to watch.
Can you help me with this link except ads
Made slight adjustments to the OP submission that reacts to DOM changes directly instead of polling for popups every second (similar to @PeterFuciik's submission, uses the MutationObserver), please find here:
https://gist.github.com/H3mul/54145fbfafe89a03c2ce24fdcb66a868
It seems video pause everytime youtube show the popup and script run, can you fix it ?
Все предложенные выше варианты больше не работают. Теперь YouTube блокирует видео проигрыватель после 3-ёх зафиксированных случаев, с использованием любого плагина напоминающего или являющемся блокировщиком рекламы. Если вы читаете это, знайте YouTube ничего не блокирует, это иллюзия. На самом деле, блокировка происходит со стороны браузера который вы используете.
Если вы хотите избежать блокировок, скачайте и используйте браузер - Vivaldi. Он основан на браузере Opera до 12 версии.
Используйте браузер - Firefox. Перед использованием, внимательно настройте вкладку настроек "Приватность и Защита". Вы всё ещё можете продолжать использовать uBlock Origin. Вот уже несколько недель я тестирую данный браузер и не испытаваю с ним проблем в отношении блокировок YouTube.
@ALL
i found an easy script that works, follow the instructions in this Video !!!
https://www.youtube.com/watch?v=XMRr-1sm_XQ
REALLY SUPER EASY DISABLE ALL OTHER BLOCKERS THEREFORE