Static ads still not skipped on Ver. 3.8
Script version 3.8
Describe the bug Static (some malware) ads are not skipped as the script doesn't do them.
Expected behavior It is supposed to close the ad via the skip button without any click input.
Desktop (please complete the following information):
- OS: Windows 10
- Browser Chrome
- Version 120.0.6099.225 (Official Build) (64-bit)
Additional context Add any other context about the problem here.
If anyone is willing to find a solution, great! I know a similar issue is currently open but this is on a different version. https://github.com/TheRealJoelmatic/RemoveAdblockThing/issues/346
Same problem here , it waits till that circle fills
@TheRealJoelmatic
Same here, hard to recreate it since it rarely happens for me, and when it happens, the timer is fast, and i cannot find a way to "pause" the timer to properly check it
And now video ads won't skip and lacks a skip button.
Since i have never seen any static ad even if i turn the script off, is there a possibility these are regionally only? If we can recreate the issue somewhat persistently its probably also easier to fix it. When it happens, right-click one the Ad and choose "Inspect" so we can post the findings here and (something like "ytp-....-.....") to find out what is called and maybe trying out different ways to fully block or circumvent it
@minanagehsalalma Thats not gonna help, since it doesn't safe the state of the website, just all core elements, but we dont know which one is called for this static ad. Which browser are you using and which country are you accessing youtube from? Maybe i can use VPN to recreate it.
Which browser are you using and which country are you accessing youtube from?
@Naginreed latest chrome version on windows
hmm about the the country ... just mail me.
also the ad shows once every 10 vids or so.
I used the TimerHooker script to stop the time and then I inspected the element, i copied the element and pasted in this file ads-static.zip
Let me know if it is useful and if you need something else
@Naginreed
i was able to copy a part of it really quick
<img class="ytp-ad-image ytp-ad-action-interstitial-background" id="ad-image:1l" alt="" style="background-image: url("https://i.ytimg.com/vi/n48_tp6KHuc/hqdefault.jpg");">
It seems to work again now, without any change to the code, maybe youtube changed something.
Same problem here , it waits till that circle fills
I can confirm this behaviour.
The log shows:
...many more.
It seems like it's trying to click the skip button like crazy but it's not working. The source of the button container:
<div class="ytp-ad-skip-button-slot" style="" id="skip-button:q"><span class="ytp-ad-skip-button-container ytp-ad-skip-button-container-detached" style=""><button class="ytp-ad-skip-button-modern ytp-button"><div class="ytp-ad-text ytp-ad-skip-button-text-centered ytp-ad-skip-button-text" id="ad-text:r" style="">Skip</div><span class="ytp-ad-skip-button-icon-modern"><svg height="100%" viewBox="-6 -6 36 36" width="100%"><path d="M5,18l10-6L5,6V18L5,18z M19,6h-2v12h2V6z" fill="#fff"></path></svg></span></button></span></div>
A manual click on the button is working.
like crazy but it's not working.
Cause it's clicking on the wrong button... It should check which button is present before triggering the click event.
It should check which button is present before triggering the click event.
I looked at the source and it already does this. It clicks the container with class ytp-ad-skip-button-container if its there and the button with class ytp-ad-skip-button-modern, but it doesn't seem to work. I tried to click this button with another script and it also didn't work. Something is off with this button.
like crazy but it's not working.
Cause it's clicking on the wrong button... It should check which button is present before triggering the click event.
We are checking what buttons from a list exist and then clicking it
Line 171 to line 191
const skipButtons = ['ytp-ad-skip-button-container', 'ytp-ad-skip-button-modern', '.videoAdUiSkipButton', '.ytp-ad-skip-button', '.ytp-ad-skip-button-modern', '.ytp-ad-skip-button' ];
...
// Iterate through the array of selectors
skipButtons.forEach(selector => {
// Select all elements matching the current selector
const elements = document.querySelectorAll(selector);
// Check if any elements were found
if (elements && elements.length > 0) {
// Iterate through the selected elements and click
elements.forEach(element => {
element?.click();
});
}
});
@TheRealJoelmatic is there a way to make it print more debugging info like what button is it continuously trying to click but failing ?
I added line 188 to log the element.
elements.length is always 1
I added line 188 to log the element.
really cool
elements.length is always 1
what does this mean?
also what button is it supposed to be clicking ...the class name doesn't seem to be right.
Been getting these too, we have the right class for the button as far as I can see. Has me wondering if youtube has gotten wise to our tricks and ignoring programatic events
And the container has extra event listeners for some (suspicious) reason. I tried faking them with dispatchEvent, and it still won't skip
Has there been any update on this issue at all? It's been a few months now having this problem.
