-
Notifications
You must be signed in to change notification settings - Fork 49
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
Created ResultLink to handle the opening of result links in new tabs #178
Created ResultLink to handle the opening of result links in new tabs #178
Conversation
Tested for wiki, stackoverflow & thesaurus and all looks good |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thank you! I think we should only open links that point out to other sites in new tabs, but other than that it works exactly as expected. Should be ready to merge after the minor change
@@ -14,12 +15,12 @@ | |||
<div class="inline-block space-x-1"> | |||
{#each meaning.similar as similar} | |||
<div class="float-left inline [&:not(:last-child)]:after:content-[',']"> | |||
<a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should still be a regular anchor tag as the link points to another page on stract
{title} | ||
use:improvements={resultIndex} | ||
target={$resultsInNewTab ? '_blank' : null} | ||
rel={$resultsInNewTab ? 'noopener noreferrer' : null} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we only need to add noopener
as referrer
is already handled for all links by a meta tag inside frontend/src/app.html
Closes #174. Adds the ability of being able to open result links in a new tab. This is done via a new settings store & component to handle the logic of the store. Adds
target="_blank" rel="noopener noreferrer"
to the anchor element.Screenshots
Updates to settings
The result being tested
Open in new tab disabled
Open in new tab enabled