|
@@ -91,13 +91,14 @@
|
|
|
document.querySelector('body').addEventListener(
|
|
|
'click',
|
|
|
function (e) {
|
|
|
- var target = e.target
|
|
|
+ let target = e.target
|
|
|
+ const baseTarget = document.querySelector('head base')?.target
|
|
|
while (target != null) {
|
|
|
if (target.matches('a')) {
|
|
|
if (
|
|
|
target.href &&
|
|
|
(['http://', 'https://', 'mailto:', 'tel:'].some(v => target.href.startsWith(v))) &&
|
|
|
- target.target === '_blank'
|
|
|
+ (target.target === '_blank' || (!target.target && baseTarget === "_blank"))
|
|
|
) {
|
|
|
window.__TAURI_INVOKE__('tauri', {
|
|
|
__tauriModule: 'Shell',
|