MediaWiki:Gadget-LiveRC 1x.js/InserisciTemplate.js: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
fix vari |
wpajax -> mw.Api (1) |
||
Riga 665:
}
var message = TemplateList[ option.value ];
new mw.Api().get( {
format: 'json',
'&inprop=protection' +▼
action: 'query',
prop: 'info',
onSuccess: InserisciTemplate_PostTagPage,▼
titles: page
} )
.done( function ( res ) {
} );
return false;
};
Riga 679 ⟶ 683:
// Get page edit token and protection status
function InserisciTemplate_PostTagPage(
var resPage = Object.values( res.query.pages )[0];
var Isprotected = false;
for ( var prEntry in resPage.protection ) {
if (
▲ if ( Type == "edit" && mw.config.get( 'wgUserGroups' ).indexOf( Level ) == -1 ) {
Isprotected = true;
break;
}
}
if ( Isprotected ) {
LiveRC_alert( "<b>" + lrcMakeText( "PROTECTEDPAGE" ).split( "$1" ).join( page ) + "</b>" );
return;
}
LiveRC_Config.edittoken =
var tpl = InserisciTemplate_showDialog( message, page );
}
|