Difference between revisions of "MediaWiki:Common.js"
From Astrolords
(Created page with "→Any JavaScript here will be loaded for all users on every page load.: function ExtLinks() { var extlinks = document.getElementsByClassName('extlink'); for (var ...") |
(No difference)
|
Revision as of 17:28, 15 May 2014
/* Any JavaScript here will be loaded for all users on every page load. */ function ExtLinks() { var extlinks = document.getElementsByClassName('extlink'); for (var i=0, il=extlinks.length; i<il; i++) { var ele = extlinks[i]; var link = ele.getElementsByTagName('a')[0]; if (link) link.setAttribute('target','_blank'); }; }; addOnloadHook(ExtLinks);