跳转到内容

MediaWiki:Common.js:修订间差异

添加14字节 、​ 2024年6月6日 (星期四)
无编辑摘要
无编辑摘要
无编辑摘要
 
(未显示同一用户的1个中间版本)
第18行: 第18行:
e.stopPropagation();
e.stopPropagation();
var temp = this, link = this.getAttribute('data-link') || '';
var temp = this, link = this.getAttribute('data-link') || '';
if(link.indexOf('http:') || link.indexOf('https:')){
if(link.includes('http:') || link.includes('https:')){
window.open(link, '_blank');
window.open(link, '_blank');
}else{
}else{
window.open('/' + link, '_blank');
window.open(location.origin + link, '_blank');
}
}
})
})