x0a / uBO-YouTube

Easier way to exempt your favorite YouTube channels from adblocking.
GNU General Public License v3.0
124 stars 8 forks source link

Cookie banner not closing #46

Closed BillAdama closed 1 year ago

BillAdama commented 1 year ago

Hi, with this extension enabled the cookie banner isn't closing after either accepting or denying all. If I refresh the page, it does disappear. I tried both with and without the automatic whitelist for subscribed channels.

Thanks, Luca

x0a commented 1 year ago

Apologies for the long wait. It took a while to chase down this bug but I've figured it out now. YouTube was making a request to /upgrade_visitor_cookie?, which internal adblocking sent to components in the userscript for parsing. The main component tries to convert that to a URL object which throws an error to YouTube's promise. May seem strange this is the first time this has been caught but apparently youtube has been religious about including the full URL when making fetch requests. E.g. https://youtube.com/upgrade_visitor_cookie?eom=1. In any case this is an easy fix, will be out soon.