ChromeExtension-ForceBackgroundTab icon indicating copy to clipboard operation
ChromeExtension-ForceBackgroundTab copied to clipboard

Use from scripts

Open SimpleSamples opened this issue 4 years ago • 1 comments
trafficstars

I realize the possible security problems but if possible I could use the ability to set the option from a script. Or the ability to override the option such that I can use JavaScript to open a new tab in the background when the option is off (set for default).

If someone can figure out how to change the option from a separate script then the security issue already exists. I tried looking at the source code; I might try harder in the future.

SimpleSamples avatar Feb 20 '21 17:02 SimpleSamples

The variables and functions are not accessible from a script which is outside the extension, so you can't change the option from a separate script.

Chrome extension supports message passing from web page to a extension, check out https://developer.chrome.com/docs/extensions/mv2/messaging/

Yuchen Wang

On Sun, Feb 21, 2021 at 1:25 AM Sam Hobbs [email protected] wrote:

I realize the possible security problems but if possible I could use the ability to set the option from a script. Or the ability to override the option such that I can use JavaScript to open a new tab in the background when the option is off (set for default).

If someone can figure out how to change the option from a separate script then the security issue already exists. I tried looking at the source code; I might try harder in the future.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/monque/ChromeExtension-ForceBackgroundTab/issues/11, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALAF7PWIT3VSGXCGZNYNQ3S77WBTANCNFSM4X6CHUCA .

monque avatar Feb 21 '21 13:02 monque