mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-12-30 01:31:49 +01:00
Fixed: External links again open in new windows.
This commit is contained in:
@@ -25,9 +25,15 @@ var routeBinder = {
|
||||
var linkElement = $target.closest('a').first();
|
||||
var href = linkElement.attr('href');
|
||||
|
||||
// Set noreferrer for external links.
|
||||
if (href && href.startsWith('http') && !linkElement.attr('rel')) {
|
||||
linkElement.attr('rel', 'noreferrer');
|
||||
if (href && href.startsWith('http')) {
|
||||
// Set noreferrer for external links.
|
||||
if (!linkElement.attr('rel')) {
|
||||
linkElement.attr('rel', 'noreferrer');
|
||||
}
|
||||
// Open all external links in new windows.
|
||||
if (!linkElement.attr('target')) {
|
||||
linkElement.attr('target', '_blank');
|
||||
}
|
||||
}
|
||||
|
||||
if (linkElement.hasClass('no-router') || event.type !== 'click') {
|
||||
|
||||
Reference in New Issue
Block a user