Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function initLinks() {
- for (i in document.links) {
- link = document.links[i];
- if (link.rel && link.rel.indexOf('external')!=-1) {
- link.onclick = onExternalLinkActivate;
- link.onkeypress = onExternalLinkActivate;
- }
- }
- }
- function onExternalLinkActivate() {
- window.open(this.href);
- return false;
- }
- window.onload = initLinks;
Add Comment
Please, Sign In to add comment