Last active
December 18, 2021 01:50
-
-
Save Shakil-Shahadat/10f3415fa626565c11c69e46bfee04c7 to your computer and use it in GitHub Desktop.
Add target="_blank" attribute to all anchor tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add target="_blank" to all anchor tags, v 1.05 | |
for ( x of document.querySelectorAll( 'a' ) ) x.setAttribute( 'target', '_blank' ); |
Author
Shakil-Shahadat
commented
Dec 18, 2021
- Move this to miscellaneous.js.
- Change target to something safer.
- Update version number to 2.0 after doing that.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment