cb theatermode clean

profile clean up and video settings

< Feedback on cb theatermode clean

Review: Good - script works

§
Posted: 2020-11-25

If video page is opened in a background tab which is not accessed within 10 seconds, the script tests timeout. It would help if test() would fire only after the tab is not hidden.

    // Wait for the page to become visible, if it's not.
    if (document.visibilityState == 'hidden') {
        window.addEventListener('visibilitychange', test, {capture: true});
    } else {
       test();
    }
§
Posted: 2020-11-27

Thank you! I have fixed the error.
Giường Ngủ Lạc An

ladroopAuthor
§
Posted: 2020-11-28

This is a rare situation and i have to do some tests for it
opening in a background tab can only happen if you say "open in new tab" and have the browser settings so that it won't go to new opened tab's
Also , why would test timeout if the tab is in the background ?
i will do some testing

Your solution may give the problem that test() may fire every time you switch tabs.
adding once=true may fix that

ladroopAuthor
§
Posted: 2020-11-28

I did some testing and indeed that scripts on the page are not started when they are in the background
however , also the user script is not started and it will start at the moment the page comes in focus

so i see no problem and all works fine

i tested with firefox / greasemonkey , firefox / tampermoney and opera / violentmonkey

what combination are you running ?

Post reply

Sign in to post a reply.