Open irvinm opened 3 weeks ago
There are some basic ideas to implement the feature:
<all_urls>
.for (const link of document.querySelectorAll('[href]')) { link.target = '_blank'; }
document.addEventListener('click', event => { const link = (event.target.nodeType == Node.ELEMENT_NODE ? event.target : event.target.parentNode).closest('[href]'); if (link) { event.preventDefault(); event.stopImmediatePropagation(); window.open(event.target.href, '_blank'); } }, { capture: true });
Ask:
Considerations: