Skip to content
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

GPII-4410: Opening BYOB web links in an existing tab. #202

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

stegru
Copy link
Member

@stegru stegru commented May 27, 2020

This turns links in the BYOB into a special url which a browser extension (https://github.com/GPII/gpii-open-same-tab-extension) will activate a tab if the link is already loaded. Otherwise, open a new tab like normal.

The urls will look like http://opensametab.morphic.org/redirect/https%3A%2F%2Fexample.com.

For times when the extension isn't installed (which can't easily be detected), things should still work. So, opensametab.morphic.org actually points to 127.0.0.1 so Morphic can listen for the request (with a /redirect handler) and perform the redirect. Behind the scenes, the url will be modified so it accesses the correct port.

Meaning, when an unconfigured browser tries to access the above url, the browser will still be redirected to https://example.com.

Requires GPII/gpii-open-same-tab-extension#2

To test: click on the reddit button - it should work with or without the browser extension.

@gpii-bot
Copy link

CI job failed: https://ci.gpii.net/job/gpii-app-tests/1146/

@stegru stegru added the 1.3.x label May 27, 2020
*/
fluid.defaults("gpii.app.linkRedirect", {
gradeNames: ["kettle.app"],
defaultRedirectUrl: "http://opensametab.morphic.org/redirect/$1",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see where the "refreshsametab.morphic.org" urls are redirected. Is that in configuration somewhere?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gpii-bot
Copy link

CI job failed: https://ci.gpii.net/job/gpii-app-tests/1149/

@amb26
Copy link
Member

amb26 commented Jun 10, 2020

13:10:55.709: FATAL ERROR: Uncaught exception: Assertion failure - check console for more details: Failed to resolve reference {gpii.app.linkRedirect}.options.defaultRedirectUrl
bound to the wrong branch, or forgot to push up a file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants