Utente:Nastoshka/TemplateScript.js: differenze tra le versioni

Da Wikivoyage.
Contenuto cancellato Contenuto aggiunto
updated scripts
fix
Riga 1: Riga 1:
/* globals $, pathoschild */
/* globals $, pathoschild */


// <nowiki>
/**
/**
* TemplateScript adds configurable templates and scripts to the sidebar, and adds an example regex editor.
* TemplateScript adds configurable templates and scripts to the sidebar, and adds an example regex editor.
Riga 6: Riga 7:
* @update-token [[File:Pathoschild/templatescript.js]]
* @update-token [[File:Pathoschild/templatescript.js]]
*/
*/
// <nowiki>
$.ajax('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js', { dataType:'script', cache:true }).then(function() {
$.ajax('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js', { dataType:'script', cache:true }).then(function() {
pathoschild.TemplateScript.add([
pathoschild.TemplateScript.add([

Versione delle 17:49, 20 gen 2016

/* globals $, pathoschild */

// <nowiki>
/**
 * TemplateScript adds configurable templates and scripts to the sidebar, and adds an example regex editor.
 * @see https://meta.wikimedia.org/wiki/TemplateScript
 * @update-token [[File:Pathoschild/templatescript.js]]
 */
$.ajax('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js', { dataType:'script', cache:true }).then(function() {
	pathoschild.TemplateScript.add([
		{
			category: 'Per gli utenti',
			name: 'Benvenuto',
			template: '{{Benvenuto|firma=~~~~}}',
			position: 'after',
			editSummary: 'Benvenuto!',
			forNamespaces: 3
		},
		{
			category: 'Per gli utenti',
			name: 'Avviso Copyviol',
			template: '{{AvvisoCopyviol|voce=titolo_della_voce|url=indirizzo_web_del_sito}} --~~~~',
			position: 'after',
			forNamespaces: 3
		},
		{
			category: 'Per gli utenti',
			name: 'AvvisoBlocco',
			template: '{{BloccoInfinito}}',
			position: 'replace',
			editSummary: 'Pagina utente di un utente bloccato infinito',
			forNamespaces: 2
		}
	]);
	
	pathoschild.TemplateScript.add(
		[
			{ name: 'Aggiornare', template: '{{Da aggiornare|anno=|mese=mm}}' },
			{ name: 'Marker', template: '{{marker|tipo=|nome=|lat=|long=}}' },
			{ name: 'Citylist', template: '{{Citylist\n| 1={{Città| nome=[[]] | alt= | descrizione=}}\n| 2={{Città| nome=[[]] | alt= | descrizione=}}\n| 3={{Città| nome=[[]] | alt= | descrizione=}}\n| 4={{Città| nome=[[]] | alt= | descrizione=}}\n| 5={{Città| nome=[[]] | alt= | descrizione=}}\n| 6={{Città| nome=[[]] | alt= | descrizione=}}\n| 7={{Città| nome=[[]] | alt= | descrizione=}}\n| 8={{Città| nome=[[]] | alt= | descrizione=}}\n| 9={{Città| nome=[[]] | alt= | descrizione=}}\n| 10={{Città| nome=[[]] | alt= | descrizione=}}\n| 11={{Città| nome=[[]] | alt= | descrizione=}}\n| 12={{Città| nome=[[]] | alt= | descrizione=}}\n| 13={{Città| nome=[[]] | alt= | descrizione=}}\n| 14={{Città| nome=[[]] | alt= | descrizione=}}\n| 15={{Città| nome=[[]] | alt= | descrizione=}}\n| 16={{Città| nome=[[]] | alt= | descrizione=}}\n| 17={{Città| nome=[[]] | alt= | descrizione=}}\n| 18={{Città| nome=[[]] | alt= | descrizione=}}\n| 19={{Città| nome=[[]] | alt= | descrizione=}}\n| 20={{Città| nome=[[]] | alt= | descrizione=}}\n}}' },
			{ name: 'IsInCat', template: '{{IsInCat|}}' },
			{ name: 'Bug', template: '{{BugTracking|numero bug|stato}}' },
			{ name: 'Riga Unesco', template: '{{RigaPatrimonio \n|Sito={{marker|nome= | lat= | long= }}\n|Anno=\n|Tipo=Culturale/Naturale/Misto\n|Criteri=\n|Immagine=\n|Descrizione=\n|id=\n}}' }
		],
		{ category:'Molto usati', position:'cursor', isMinorEdit: 'true' }
	);
});
// </nowiki>