Closed robmonte closed 3 years ago
I believe there is no way to inject content script into another extension. I've tried matches chrome-extension://*/*
and moz-extension://*/*
and looks like they are forbidden.
Also source: https://stackoverflow.com/a/18189841
That makes sense, so my initial assumption is wrong.
However, I think there should be some other way to get this to work on the Alternate twitch player page still. I believe the chat is loaded in a sub-frame of the webpage and thus should be loaded under https and not moz-extension/chrome-extension. For example, FrankerfaceZ gets loaded in the chat on the Alternate player page so this addon is still capable of detecting the chat.
I noticed that FFZ's manifest.json file has this line: "all_frames": true
added to the content_scripts object. perhaps it is as simple as that?
BetterTTV and FFZ are loaded manually inside Alternate Player for Twitch.tv: https://github.com/kurtextrem/Twitch5/blob/master/content.js#L427-L457
"all_frames": true
would not work because extension wouldn't inject inside chrome-extension://*/*
URL anyway.
P.S. I know that github source code of Alternate Player for Twitch.tv is outdated, but I've checked sources from last version from Chrome Web Store it's basically the same.
Ah okay, thanks for explaining. In that case maybe I can make a feature request in Alternate player to load this addon as well. Thanks for the info!
Edit: Nevermind, his development halted. 😢 Well, I guess that's all there is to it then.
Is there a way to allow the addon to work with the Alternate Player for Twitch.tv addon? That addon loads a local page ( moz-extension://\/player.html?channel=\ ) instead of twitch.tv so I assume this is why the addon doesn't currently load on it.