MediaWiki:Gadget-fastbuttons.js/core.js: diferenças entre revisões

Conteúdo apagado Conteúdo adicionado
m Correção
Manutenção: Uso de typeof ... === 'function' em vez de $.isFunction(...), que tornou-se obsoleta
Linha 40:
* @property {string}
*/
this.version = /*{{subst:Autossubstituição/Estampa com data e hora|js|.*/ '2021-0105-0702 2209:0757:4826 (UTC)' /*}}.*/;
 
/**
Linha 81:
var apiDeferred = $.Deferred(),
edit = function ( value ) {
if ( $.isFunction(typeof info.text )=== 'function' ) {
info.text = info.text( value );
}
Linha 111:
// If "info.text" is set and is a function, gets the page content first
// Set "info.getText" if you need get the content of another page other than "info.title"
if ( typeof info.getText === 'string' || $.isFunction(typeof info.text )=== 'function' ) {
fastb.notify( fastb.message( 'fastb-notify-getPageContent' ) );
api.getCurrentPageText( info.getText || info.title ).done( function ( value ) {
Linha 226:
item = list[ i ];
 
if ( $.isFunction(typeof item )=== 'function' ) {
item();
} else if ( ( typeof item === 'string' ) || ( item instanceof jQuery ) ) {
Linha 373:
},
promptCallback = function ( comment ) {
if ( $.isFunction(typeof btn.action )=== 'function' ) {
btn.action();
} else {
Linha 427:
}
 
if ( $.isFunction(typeof btn.action )=== 'function' ) {
fastb.textButton = btn.text;
}
 
if ( $.isFunction(typeof btn.action )=== 'function' && $.inArray( btn.text, [ 'Semirrápida', 'Consenso', 'Não assinou' ] ) === -1 ) {
$( this ).addClass( 'fastb-menu-open' );
}
Linha 460:
props.title = '';
} else {
props.class += 'fastb-' + ( button.type || ( $.isFunction(typeof button.action )=== 'function' || button.action === 'request' ? 'menu' : 'action' ) ) + '-button';
props.click = ( button.action === 'request' ) ? fastb.openPrompt.bind( fastb, 'requests', button ) : buttonClick( button );
}