Index: trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js |
— | — | @@ -769,12 +769,12 @@ |
770 | 770 | * Init function which is called upon page load. Binds the WikiLove icon to opening the dialog. |
771 | 771 | */ |
772 | 772 | init: function() { |
773 | | - options = $.wikiLoveOptions; |
| 773 | + options = $.wikiLoveOptions; |
774 | 774 | |
775 | | - if ( mw.config.get( 'skin' ) == 'standard' ) { |
| 775 | + if ( $( '#ca-wikilove' ).length ) { |
| 776 | + var $wikiLoveLink = $( '#ca-wikilove' ).find( 'a' ); |
| 777 | + } else { // legacy skins |
776 | 778 | var $wikiLoveLink = $( '#topbar a:contains(' + mw.msg( 'wikilove-tab-text' ) + ')' ); |
777 | | - } else { |
778 | | - var $wikiLoveLink = $( '#ca-wikilove' ).find( 'a' ); |
779 | 779 | } |
780 | 780 | $wikiLoveLink.unbind( 'click' ); |
781 | 781 | $wikiLoveLink.click( function( e ) { |