haruneko
haruneko copied to clipboard
Dev problem : "load" event not triggered because of ads
I got the case today on Hakuneko for ReadComicOnline.
Let me be clear : Its a Hakuneko issue that i believe can happen in Haruneko.
I needed to execute a script on the page (fetchui). The page could have a captcha so i put a 60seconds timeout. The webpage NEVER close. Because you have to click on an ad for the load event to be send and Hakuneko to close the page.
- If there was a captcha before, window is visible to the user but he still need to click on the ad
- if no captcha was present we end up being timeouted after 60 seconds because windows is invisible so user cant click .
- Blacklisting ads host allow the load event to be fired and fetchui to work properly. But ads hosts are changing and random letters and numbers, blacklisting all is not viable.
Possible solution : Allow a way to execute JavaScript after an arbitrary delay (ignoring the load event) and gracefully "close" the browser window even if load event is not triggered, when the promise is fulfilled maybe?
If you are referring to popup dialogs blocking the window from being closed, this is already handled by PreventDialogs
No its something like, overlay ads perhaps? Its weird to define. Its just that the load event never fires and each time i encounter that page got some annoying ads. When i blacklist the hosts, the problem vanishes.