MediaWiki:Wikiminiatlas.js: Difference between revisions

m
need to cast to int before incrementing
(stop showing the tooltip automatically after a few times)
m (need to cast to int before incrementing)
Line 446: Line 446:
   (function() {
   (function() {
     // increase display counter
     // increase display counter
     window.localStorage.setItem('wmatooltipdismissed',ttc+1);
     window.localStorage.setItem('wmatooltipdismissed',parseInt(ttc)+1);
     var wrap, span=$('#coordinates>span>span>img')
     var wrap, span=$('#coordinates>span>span>img')
       , bubble = $('<div><div>').css( { width: '150px', border: '1px solid #bbb', borderRadius: '8px', position: 'absolute', bottom: '22px', right: '-4px', whiteSpace: 'normal', textAlign: 'left', padding: '0.25em 0.75em 0.25em 0.75em', fontSize: '90%', backgroundColor: '#f9f9f9', boxShadow: '4px 4px 10px rgba(0,0,0,0.2)' } ).text('Click the blue globe to open an interactive map.').append( $('<div></div>').css({position: 'absolute', width: 0, height: 0, bottom: '-10px', right: '10px', borderBottom:0, borderLeft: '5px solid transparent', borderRight:  '5px solid transparent', borderTop:  '10px solid #bbb'})  ).append( $('<div></div>').css({position: 'absolute', width: 0, height: 0, bottom: '-7px', right: '10px', borderBottom:0, borderLeft: '5px solid transparent', borderRight:  '5px solid transparent', borderTop:  '10px solid #f9f9f9'})  ).hide();
       , bubble = $('<div><div>').css( { width: '150px', border: '1px solid #bbb', borderRadius: '8px', position: 'absolute', bottom: '22px', right: '-4px', whiteSpace: 'normal', textAlign: 'left', padding: '0.25em 0.75em 0.25em 0.75em', fontSize: '90%', backgroundColor: '#f9f9f9', boxShadow: '4px 4px 10px rgba(0,0,0,0.2)' } ).text('Click the blue globe to open an interactive map.').append( $('<div></div>').css({position: 'absolute', width: 0, height: 0, bottom: '-10px', right: '10px', borderBottom:0, borderLeft: '5px solid transparent', borderRight:  '5px solid transparent', borderTop:  '10px solid #bbb'})  ).append( $('<div></div>').css({position: 'absolute', width: 0, height: 0, bottom: '-7px', right: '10px', borderBottom:0, borderLeft: '5px solid transparent', borderRight:  '5px solid transparent', borderTop:  '10px solid #f9f9f9'})  ).hide();
Anonymous user