Hacks & Customizations
These hacks are unsupported customizations meant as unofficial workarounds.
They can cause instability, introduce issues and may conflict with future updates. Apply at your own risk!

Force Page Content Links to Open in New Tabs

  • Author: @ssddanbrown
  • Created: 27th Jan 2023
  • Updated: 27th Jan 2023
  • Last Tested On: v22.11.1

This hack will force HTML links, within the main content body of a page, to open in a new tab.

Considerations

This works via JavaScript, so is not assured to run since a user could have JavaScript disabled although this is relatively rare.

Code

head.html
1
2
3
4
5
6
<script type="module">
    const links = document.querySelectorAll('.page-content a');
    for (const link of links) {
        link.target = '_blank';
    }
</script>

Latest Hacks