Greasy Fork is available in English.

Auto Close YouTube Ads

Close and/or Mute YouTube ads automatically!

< Spätná väzba na Auto Close YouTube Ads

Otázka/komentár

§
Pridaný: 15.06.2024

The cancel skip button was broken because of the if statement that checks to see if the preSkipButton element exists. This worked well until YT made a change where the textContent of skipText will initially be read as an empty string. Even though the element exists and it was able to get the textContent of it, the if statement following it will always return false because empty strings return false in JS.

To fix this, you can update the if statement inside the setupCancelDiv function on line 157 to if (skipText || skipText == "") {.

§
Pridaný: 15.06.2024

To fix this, you can update the if statement inside the setupCancelDiv function on line 157 to if (skipText || skipText == "") {.

Minor correction, it should actually be if (skipText || skipText === "") { to ensure that it checks only for empty Strings.

Pridať odpoveď

Aby ste mohli pridať odpoveď, prihláste sa.