Open Links in New Tab

Open all links in a new tab

< 腳本Open Links in New Tab的回應

提問/評論

§
發表於:2023-08-24

You could also just add a <base target="_blank"> tag in the page's section.
It'd cover all links, as well as form submissions, yet it'd respect links that have their own target attribute set.

document.head.append(Object.assign(document.createElement('base'), { target: '_blank' }));

發表回覆

登入以回覆