User:Js/urldecoder.js: Difference between revisions

Content deleted Content added
m Remove outdated comment about deprecated global wgNamespaceIds, available since MW 1.16 (which is now unsupported)
Migration: mw.util.updateTooltipAccessKeys( $nodes ) → $nodes.updateTooltipAccessKeys() (see phab:rMW16c5d8801e465abd4d6ce7f44a516500a10bcb0d for details)
Line 12:
}
 
mw.loader.using( [ 'user.options', 'jquery.textSelection', 'jquery.accessKeyLabel' ], function () {
/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar . . . */
if ( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) !== -1 ) {
$(document).ready( function () {
if ( mw.user.options.get('usebetatoolbar') ) {
mw.loader.using( 'ext.wikiEditor.toolbar', addUrlDecoderButton );
Line 45:
 
var btn = $('<img class=mw-toolbar-custombutton id="' + bId + '">')
.attr({ src: bIcon, title: bTitle, alt: bTitle.substr(0,3) })
.css({ height:'20px', 'background-color':'#bce', border:'1px outset #bce', margin:'0 1px', cursor:'pointer'})
.click(bFunc)
.appendTo('#toolbar')
if( bKey ){
mw.util.updateTooltipAccessKeys( btn[0] )
btn.attr({ accesskey: bKey, title: bTitle + ' ['+bKey+']' })
mw.util .updateTooltipAccessKeys( btn[0] );
}