RemoveAdblockThing icon indicating copy to clipboard operation
RemoveAdblockThing copied to clipboard

Static ads still not skipped on Ver. 3.8

Open supersmith2500 opened this issue 1 year ago • 20 comments

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

supersmith2500 avatar Jan 21 '24 17:01 supersmith2500

Same problem here , it waits till that circle fills image

@TheRealJoelmatic

minanagehsalalma avatar Jan 22 '24 00:01 minanagehsalalma

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

Thraxelon avatar Jan 22 '24 12:01 Thraxelon

And now video ads won't skip and lacks a skip button.

supersmith2500 avatar Jan 22 '24 20:01 supersmith2500

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

Naginreed avatar Jan 23 '24 10:01 Naginreed

@Naginreed i ctrl+s the page when it showed

test.zip

idk if it would be any useful tho

minanagehsalalma avatar Jan 23 '24 17:01 minanagehsalalma

@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.

Naginreed avatar Jan 23 '24 18:01 Naginreed

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.

minanagehsalalma avatar Jan 23 '24 18:01 minanagehsalalma

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

lullibeps01 avatar Jan 24 '24 11:01 lullibeps01

@Naginreed

minanagehsalalma avatar Jan 24 '24 12:01 minanagehsalalma

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(&quot;https://i.ytimg.com/vi/n48_tp6KHuc/hqdefault.jpg&quot;);">

minanagehsalalma avatar Jan 24 '24 22:01 minanagehsalalma

It seems to work again now, without any change to the code, maybe youtube changed something.

lullibeps01 avatar Jan 27 '24 18:01 lullibeps01

Same problem here , it waits till that circle fills image

I can confirm this behaviour. The log shows: Screenshot 2024-01-28 at 14 08 39 ...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.

rguca avatar Jan 28 '24 13:01 rguca

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.

minanagehsalalma avatar Jan 28 '24 14:01 minanagehsalalma

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.

rguca avatar Jan 28 '24 15:01 rguca

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 avatar Jan 28 '24 15:01 TheRealJoelmatic

@TheRealJoelmatic is there a way to make it print more debugging info like what button is it continuously trying to click but failing ?

minanagehsalalma avatar Jan 28 '24 19:01 minanagehsalalma

I added line 188 to log the element.

Screenshot 2024-01-28 at 20 21 43 Screenshot 2024-01-28 at 20 21 25

elements.length is always 1

rguca avatar Jan 28 '24 19:01 rguca

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.

minanagehsalalma avatar Jan 28 '24 20:01 minanagehsalalma

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

Entarra avatar Feb 12 '24 00:02 Entarra

Has there been any update on this issue at all? It's been a few months now having this problem.

MaKun01 avatar Apr 06 '24 09:04 MaKun01