Index: trunk/extensions/MobileFrontend/javascripts/references.js |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | $( '<div id="mf-references"><div></div></div>' ).hide().appendTo( document.body ); |
35 | 35 | var close = function() { |
36 | 36 | $( '#mf-references' ).fadeOut( options.animationSpeed ); |
37 | | - }; |
| 37 | + }, lastLink; |
38 | 38 | $( '<button>close</button>' ).click( close ).appendTo( '#mf-references' ); |
39 | 39 | $( '.mw-cite-backlink a' ).click( close ); |
40 | 40 | |
— | — | @@ -43,7 +43,8 @@ |
44 | 44 | data = href && href.charAt(0) === '#' ? |
45 | 45 | references[ href.substr( 1, href.length ) ] : null; |
46 | 46 | |
47 | | - if( !$("#mf-references").is(":visible") ) { |
| 47 | + if( !$("#mf-references").is(":visible") || lastLink !== href) { |
| 48 | + lastLink = href; |
48 | 49 | if( data ) { |
49 | 50 | html = '<h3>[' + data.label + ']</h3>' + data.html; |
50 | 51 | } else { |