https://bugzilla.wikimedia.org/show_bug.cgi?id=38487

--- Comment #3 from Helder <[email protected]> ---
(In reply to comment #2)
> A gadget could try to do this until the bug is fixed
Here is another way:
------------------------------------------------------------------
// Workaround for [[bugzilla:38487]]
function fixBigButton(){
  $( '.tool-button[rel=big]' )
    .off( 'click' )
    .on( 'click', function( e ){
      e.preventDefault();
      $( '#wpTextbox1' ).textSelection(
        'encapsulateSelection', {
          'pre': '<span style="font-size: larger;">',
          'peri': mw.msg( 'wikieditor-toolbar-tool-big-example' ),
          'post': '</span>'
        }
      );
    } );
}

if ( $.inArray( mw.config.get( 'wgAction' ), ['edit', 'submit'] ) !== -1 ) {
  mw.loader.using( 'user.options', function () {
    if ( mw.user.options.get('usebetatoolbar') ) {
      mw.loader.using( [ 'jquery.textSelection', 'ext.wikiEditor.toolbar' ],
function () {
        $( fixBigButton );
      } );
    }
  } );
}
------------------------------------------------------------------

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to