New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passing unique string data to opened tabs? #2328
Comments
See also #2134 |
That simply confirms that GM_openInTab returns null, but doesn't make reference to my use case. |
one workaround would be to add an anchor to the URL and have a script process that anchor. For larger payloads you could use that anchor as ID and then use broadcast channels to have the tabs talk to each other. Note that web content can listen/manipulate these kinds of communication channels. |
I would avoid anchors for that very reason. |
You can use |
That sounds like it's for communicating between different scripts, not the same script running on a new page. |
@Sasstraliss Why do you think "it's for communicating between different scripts"? Script can't get UUID of different script - only UUID of the same. |
Here's a trick I learned from reddit. A fair amount of pseudocode as far as variables are concerned, but it might help. Assuming the target window and parent window are on sites the script is for...
|
@DoomTay, please use triple backquotes to keep source formatting. |
@the8472 said:
Alas, this is experimental technology only available in Fx38+. A more appropriate solution would be using localStorage API and storage events. see http://stackoverflow.com/questions/2236828/javascript-communication-between-tabs-windows-with-same-origin/12514384#12514384 |
Now that GM_openInTab no longer returns the window object, and thus we can't set window variables from the script that opens the window, how can one pass unique string data to a tab, designated for just that tab?
The text was updated successfully, but these errors were encountered: