younesaassila / ttv-lol-pro

TTV LOL PRO removes most livestream ads from Twitch. This is free, don't expect it to be perfect.
GNU General Public License v3.0
1.45k stars 29 forks source link

[Request] Remove interaction with non-player pages or whitelisted channels #250

Closed Gamertech closed 1 year ago

Gamertech commented 1 year ago

Is your feature request related to a problem? Please describe. (Firefox) When the extension is enabled, loading the dashboard, directory, whitelisted channels etc are slowed down noticeably. It can also prevent the dashboard player loading at all unless you whitelist your own channel.

Describe the solution you'd like If possible when a whitelisted channel or non-player page is opened, the extension not interact with it. Even when a channel is whitelisted, the extension still proxies 1 request and slows down page/player load by several seconds sometimes.

Eliminating excess proxy requests would also hopefully reduce a little load on the proxy servers. (unless it's required anyway)

Describe alternatives you've considered Disabling the extension makes page/player loads instant again, but ofc brings back ads in non-subbed channels.

Disabling "Use my TTV LOL PRO passport" or adjusting any other settings in the options panel has no effect on load times.

Additional context https://www.twitch.tv/directory/ https://dashboard.twitch.tv/ etc

younesaassila commented 1 year ago

Unfortunately some requests have to be proxied (e.g. passport requests) even for whitelisted channels in the case you switch streams from a whitelisted channel to a non-whitelisted channel in the same tab. In my testing, I did see an extra video weaver request being proxied at the very beginning of a whitelisted stream loading in a new tab. I don't know if this can be fixed though since this is due to the video weaver request happening before the Usher response containing weaver links for a channel is processed by the content script (race condition?). (Fixed in v2.2.0)

younesaassila commented 1 year ago

I've added additional checks to ignore Usher and Video Weaver requests from hosts other than www.twitch.tv and m.twitch.tv. This should make the dashboard load a bit faster (though other important requests like Passport, if any, will still be proxied) I'll consider this as fixed for v2.2.0, closing

Gamertech commented 1 year ago

Thank you :)