fix: open links in new tab
The addition of external link warning has changed the behavior of opening links from opening in a new tab to opening in the same tab. This restores the old behavior and opens all links in a new tab. Signed-off-by: Tony Chau <90050474+fo5for@users.noreply.github.com>
This commit is contained in:
committed by
Erik Michelson
parent
d05cfe4e9f
commit
ffcf79ef07
@@ -27,15 +27,18 @@
|
||||
<p><%= __('Do you want to continue?') %></p>
|
||||
<p>
|
||||
<a class="btn btn-primary" href="<%- targetURL %>"><%= __('Continue to external page') %></a>
|
||||
<a class="btn btn-default" href="<%- serverURL %>/<%- noteURL %>"><%= __('Back to your note') %></a>
|
||||
<a class="btn btn-default" id="close-button"><%= __('Close') %></a>
|
||||
</p>
|
||||
<% } else { %>
|
||||
<p class="text-danger"><strong><%= __('The provided link is not a valid URL.') %></strong></p>
|
||||
<p>
|
||||
<a class="btn btn-default" href="<%- serverURL %>/<%- noteURL %>"><%= __('Back to your note') %></a>
|
||||
<a class="btn btn-default" id="close-button"><%= __('Close') %></a>
|
||||
</p>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script nonce="<%= cspNonce %>">
|
||||
document.getElementById("close-button").addEventListener('click', _ => window.close())
|
||||
</script>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user