MediaWiki:Wikiminiatlas.js: Difference between revisions
(uk/ca) |
(cleanup) |
||
Line 215: | Line 215: | ||
// Get a specific, localized string | // Get a specific, localized string | ||
_msg = function(k) { | _msg = function(k) { | ||
return strings[k][language] || strings[k].en | return strings[k][language] || strings[k].en; | ||
}, | }, | ||
dbName = mw.config.get( 'wgDBname' ), | dbName = mw.config.get( 'wgDBname' ), | ||
Line 314: | Line 314: | ||
} | } | ||
} | } | ||
break; | |||
case 'unhighlight' : | case 'unhighlight' : | ||
highlight(-1); | highlight(-1); | ||
Line 347: | Line 348: | ||
wc = config, | wc = config, | ||
marker = { lat:0, lon:0 }, coordinates = null, | marker = { lat:0, lon:0 }, coordinates = null, | ||
links, key, icons, startTime, content, mapbutton; | |||
// apply settings | // apply settings | ||
Line 604: | Line 605: | ||
var rbrtl = [ '//upload.wikimedia.org/wikipedia/commons/b/b5/Button_resize.png', | var rbrtl = [ '//upload.wikimedia.org/wikipedia/commons/b/b5/Button_resize.png', | ||
'//upload.wikimedia.org/wikipedia/commons/3/30/Button_resize_rtl.png' ] | '//upload.wikimedia.org/wikipedia/commons/3/30/Button_resize_rtl.png' ]; | ||
wi.resizebutton = $('<img>').attr( { | wi.resizebutton = $('<img>').attr( { | ||
title : _msg('resize'), | title : _msg('resize'), | ||
Line 618: | Line 619: | ||
} ).css( { | } ).css( { | ||
zIndex : 15, position : 'absolute', right : '11px', top : '9px', width : '18px', cursor : 'pointer' | zIndex : 15, position : 'absolute', right : '11px', top : '9px', width : '18px', cursor : 'pointer' | ||
} ).click( function(e) { wi.div.hide() } ); | } ).click( function(e) { wi.div.hide(); } ); | ||
wi.iframe = $('<iframe/>') | wi.iframe = $('<iframe/>') | ||
Line 643: | Line 644: | ||
'user-select': 'none', '-moz-user-select': 'none', '-ms-user-select': 'none' | 'user-select': 'none', '-moz-user-select': 'none', '-ms-user-select': 'none' | ||
} ).css( (rtl?'right':'left'), '3px' ) | } ).css( (rtl?'right':'left'), '3px' ) | ||
.mouseenter( function(e) { wi.resizebutton.fadeIn() } ) | .mouseenter( function(e) { wi.resizebutton.fadeIn(); } ) | ||
.mouseleave( function(e) { if( idle ) { wi.resizebutton.fadeOut(); } } ) | .mouseleave( function(e) { if( idle ) { wi.resizebutton.fadeOut(); } } ) | ||
.mousedown( function(e) { | .mousedown( function(e) { |