🐛 Increase compatibility with ChatGPT redirection.
This commit is contained in:
2
src-tauri/src/inject/event.js
vendored
2
src-tauri/src/inject/event.js
vendored
@@ -116,7 +116,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
const absoluteUrl = hrefUrl.href;
|
const absoluteUrl = hrefUrl.href;
|
||||||
|
|
||||||
// Handling external link redirection.
|
// Handling external link redirection.
|
||||||
if (window.location.host !== hrefUrl.host && target === '_blank') {
|
if (window.location.host !== hrefUrl.host && (target === '_blank'|| target === '_new'))) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
invoke('open_browser', { url: absoluteUrl });
|
invoke('open_browser', { url: absoluteUrl });
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user