Skip to content

Chrome: Opening a Twitter tab in background for 10 seconds causes script to fail #198

@mcpower

Description

@mcpower

This issue occurs with both the Chrome extension (version 2.22.0) and the UserScript (version 88). Tested on a clean Chrome profile.

With Chrome 109, opening a Twitter page in the background, and waiting a few seconds before switching to the tab, causes Tweak New Twitter to not be injected. The culprit seems to be these lines:

https://github.com/insin/tweak-new-twitter/blob/62625cdfb562d3978847393637355288f7cd12c3/tweak-new-twitter.user.js#L3289-L3296

I suspect that Tweak New Twitter is being run, but the actual DOM isn't rendered until the user switches to the tab. Interestingly, Chrome renders the tab without a <title>, just the URL:

image

and it seems like hovering over the tab to activate Chrome's tab preview causes the DOM and <title> to be rendered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions