MediaWiki:Gadget-LiveRC 1x.js/InserisciTemplate.js: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m altri fix stilistici
fix vari
Riga 14:
LiveRC_Config.InstalledLiveRCExtensions.push( "InserisciTemplate" );
 
/////////////////////////////// CSS ///////////////////////////////////////////////////////
importStylesheetURI( '//it.wikipedia.org/w/index.php?title=MediaWiki:Gadget-LiveRC 1x.js/InserisciTemplate.css&action=raw&ctype=text/css' );
 
///////////////////////// VARIABLES ////////////////////////////////////////////////////////
 
//// PARAMÈTRES PERSONNALISABLES ////
 
var templateArguments = {
Riga 636 ⟶ 631:
 
var TemplateList = Custom_lstMyTemplate;
if ( !lrcGetObjectLengthObject.keys( TemplateList ).length ) {
TemplateList = lstMyTemplate;
}
Riga 666 ⟶ 661:
 
var TemplateList = Custom_lstMyTemplate;
if ( !lrcGetObjectLengthObject.keys( TemplateList ).length ) {
TemplateList = lstMyTemplate;
}
Riga 788 ⟶ 783:
 
function InserisciTemplate_dumpTemplate( template, params ) {
var text, templateParams = ""LiveRC_FormatTemplateParams( params || {} );
text =return ( template.noinclude ? '<noinclude>' : '' ) +
templateParams = LiveRC_FormatTemplateParams( params || {} );
text = ( template.noinclude ? '<noinclude>' : '' ) +
'{{' + ( template.subst ? 'subst:' : '' ) +
template.template + '|' +
Riga 796 ⟶ 790:
'}}' +
( template.noinclude ? '</noinclude>' : '' ) + '\n';
return text;
}
 
Riga 814 ⟶ 807:
lrcDisableLink( "LiveTagReason" );
lrcDisableLink( "LiveTagLink" );
var EditParam = [];//XXX Questo dev'essere un oggetto!
EditParam.token = LiveRC_Config.edittoken;
if ( data.where == 'top' ) {
Riga 836 ⟶ 829:
}
Params = Params.join( "&" );
var headers = [];//XXX Questo dev'essere un oggetto!
headers[ 'Content-Type' ] = 'application/x-www-form-urlencoded';
wpajax.http( {
Riga 865 ⟶ 858:
var Target = InserisciTemplateUl.parentNode;
var Templates = Custom_lstMyTemplate;
if ( !Templates || lrcGetObjectLength!Object.keys( Templates ) == 0.length ) {
Templates = lstMyTemplate;
}
Riga 916 ⟶ 909:
var Div = DeleteLink;
while ( Div ) {
if ( lrcHasClass( Div,.classList.contains( "InserisciTemplate_TemplateDiv" ) ) {
break;
}
Riga 1 317 ⟶ 1 310:
return;
}
var ElementForms = lrcGetElementsByClass$( "InserisciTemplate_TemplateForm", ITConfigPanel, ").find( 'form".InserisciTemplate_TemplateForm' );
var Items = {};
for ( var a = 0, l = ElementForms.length; a < l; a++ ) {
Riga 1 328 ⟶ 1 321:
NewItem.subst = ( getElementWithId( 'subst', 'input', ThisForm ).checked ? true : false );
NewItem.parameters = {};
var ParamLIs = lrcGetElementsByClass$( "LI_parameters_li", ThisForm, ").find( 'li".LI_parameters_li' );
for ( var b = 0, m = ParamLIs.length; b < m; b++ ) {
var ParamLi = ParamLIs[ b ];
Riga 1 411 ⟶ 1 404:
}
} else {
if ( lrcGetObjectLengthObject.keys( OldItems[ template ][ item ] ).length !== lrcGetObjectLengthObject.keys( NewItems[ template ][ item ] ).length ) {
return true;
}