Use host instead of hostname for proper matching against the window location
This commit is contained in:
2
src-tauri/src/inject/event.js
vendored
2
src-tauri/src/inject/event.js
vendored
@@ -176,7 +176,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
// case: download from dataURL -> convert dataURL ->
|
// case: download from dataURL -> convert dataURL ->
|
||||||
} else if (url.startsWith('data:')) {
|
} else if (url.startsWith('data:')) {
|
||||||
downloadFromDataUri(url, filename);
|
downloadFromDataUri(url, filename);
|
||||||
} else if (isDownloadLink(url) || anchorEle.hostname !== window.location.host) {
|
} else if (isDownloadLink(url) || anchorEle.host !== window.location.host) {
|
||||||
handleExternalLink(e, url);
|
handleExternalLink(e, url);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user