MediaWiki:Wikiminiatlas.js: Difference between revisions
that did not work, as the protocol is added to a.href, however $(a).attr('href') returns the ''original'' protocol-relative URL!
(link is protocol relative in the template now) |
(that did not work, as the protocol is added to a.href, however $(a).attr('href') returns the ''original'' protocol-relative URL!) |
||
Line 442: | Line 442: | ||
,lo1 = Infinity, lo2 =- Infinity | ,lo1 = Infinity, lo2 =- Infinity | ||
,ex,ey; | ,ex,ey; | ||
for( i = 0; i < l.length; ++i ) { | for( i = 0; i < l.length; ++i ) {// TODO: replace with .each | ||
if( l[i].href === '//en.wikipedia.org/w/index.php?title=Template:Attached_KML/'+mw.config.get( 'wgPageName' )+'&action=raw' ) { | if( $(l[i]).attr('href') === '//en.wikipedia.org/w/index.php?title=Template:Attached_KML/'+mw.config.get( 'wgPageName' )+'&action=raw' ) { | ||
coordinates = 1; | coordinates = 1; | ||
$.ajax({ | $.ajax({ |