Open the Safari web inspector and verify that two copies of the content script have loaded in the page.
Analysis: In the manifest json file, Tweaks declares the following: "content_scripts": [{ "js": ["script.js"], "matches": ["https://*.twitter.com/*"] }] So it handles any Twitter URL, mobile or non-mobile. If you give the extension permission to access both mobile.twitter.com and twitter.com, then Safari will load the content script twice when you visit a mobile.twitter.com URL, because it has "double access". This is a bug. The same bug can be triggered on iOS https://apps.apple.com/app/tweaks-for-twitter-mobile/id1582826292?mt=8 with similar though maybe slightly different steps to reproduce, because Twitter often redirects to mobile URLs. You could visit a mobile.twitter.com URL first in Safari, and then go to the Settings app and give Tweaks "Allow" permissions for twitter.com too.
I've tested and reproduced this bug in Safari 16 on both macOS 12.6 and iOS 16.1 (beta).
Steps to reproduce (Mac):
Analysis: In the manifest json file, Tweaks declares the following: "content_scripts": [{ "js": ["script.js"], "matches": ["https://*.twitter.com/*"] }] So it handles any Twitter URL, mobile or non-mobile. If you give the extension permission to access both mobile.twitter.com and twitter.com, then Safari will load the content script twice when you visit a mobile.twitter.com URL, because it has "double access". This is a bug. The same bug can be triggered on iOS https://apps.apple.com/app/tweaks-for-twitter-mobile/id1582826292?mt=8 with similar though maybe slightly different steps to reproduce, because Twitter often redirects to mobile URLs. You could visit a mobile.twitter.com URL first in Safari, and then go to the Settings app and give Tweaks "Allow" permissions for twitter.com too.