Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rungta/461e738f9f40e97c349f62e613e51f9b to your computer and use it in GitHub Desktop.
Save rungta/461e738f9f40e97c349f62e613e51f9b to your computer and use it in GitHub Desktop.
Open all external links in a new window
@rungta
Copy link
Author

rungta commented May 14, 2018

Updated to preserve existing rel attribute value (as opposed to overwriting it).

@rungta
Copy link
Author

rungta commented May 25, 2018

Added InstantClick (a PJAX library) support.

@cn-tools
Copy link

Hi @rungta ,
THX 4 this script!
But if i use it, i get an error "Uncaught ReferenceError: InstantClick is not defined".
I change the line 15 into "(typeof InstantClick != "undefined")" and it works for me.
best regards

@rungta
Copy link
Author

rungta commented Dec 14, 2019

Fixed it. Thanks @cn-tools!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment