Use host instead of hostname for proper matching against the window location

This commit is contained in:
Matthew Bajorek
2024-07-25 15:36:51 -04:00
committed by jeasonnow
parent d8b6580610
commit b93b8365e2

View File

@@ -176,7 +176,7 @@ document.addEventListener('DOMContentLoaded', () => {
// case: download from dataURL -> convert dataURL ->
} else if (url.startsWith('data:')) {
downloadFromDataUri(url, filename);
} else if (isDownloadLink(url) || anchorEle.hostname !== window.location.host) {
} else if (isDownloadLink(url) || anchorEle.host !== window.location.host) {
handleExternalLink(e, url);
}
},