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

Contenuto cancellato Contenuto aggiunto
semi-rv
- try/catch, non si ravvisa l'utilità di nascondere messaggi di errore in questo modo
 
(14 versioni intermedie di 3 utenti non mostrate)
Riga 1:
mw.util.addPortletLink( 'p-tb', '//it.wikipedia.org/wiki/Wikipedia:LiveRC', 'LiveRC 1.x', '' );
// Script di LiveRC
jQuery(document).ready(function($){
mw.util.addPortletLink('p-tb', '//it.wikipedia.org/wiki/Wikipedia:LiveRC', 'LiveRC 1.x', '');
});
 
if ( mw.config.get( 'wgPageName' ) == 'Wikipedia:LiveRC' ) {
//<source lang=javascript>
mw.loader.load( '//fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget-LiveRC.js&action=raw&ctype=text/javascript' );
if (wgPageName == 'Wikipedia:LiveRC'){
mw.loader.load('//fr.wikipedia.org/w/index.php?title='
+ 'MediaWiki:Gadget-LiveRC.js'
+ '&action=raw&ctype=text/javascript');
}
 
function LiveRC_getSiteCustom() {
lrcParams[ "PageTitle" ] = "Wikipedia:LiveRC"; // Pagina principale del LiveRC
// Here comes the configuration
lrcParams[ "SandboxPage" ] = "Wikipedia:Pagina delle prove"; // Pagina della Sandbox
try{
lrcParams[ "TchatChannel" ] = "#wikipedia-it-liverc"; // Canale della chat
window.lrcParams = {
lrcParams[ "TZ" ] = '+01:00'; // Fuso orario (+02:00, 02:00, -0200, -05:45, ...)
"PageTitle" : "Wikipedia:LiveRC",
lrcParams[ "SubstWarnings" ] = false;
"SandboxPage" : "Wikipedia:Pagina delle prove",
"TchatChannel" : "#wikipedia-it-liverc",
"TZ" : '+01:00',
"SubstWarnings" : false
};
 
UnTranslatedTexts[ "ON_ARTICLE" ] = "su";
window.UnTranslatedTexts = {
UnTranslatedTexts[ "UPDATEMESSAGES" ] = "Aggiornamento configurazione Mediawiki locale";
ON_ARTICLE: "su",
UnTranslatedTexts[ "MWSiteGlobalLegend" ] = "Configurazione locale di Mediawiki";
UPDATEMESSAGES: "Aggiornamento configurazione Mediawiki locale",
UnTranslatedTexts[ "MWGeneralConfigLegend" ] MWSiteGlobalLegend:= "Configurazione localegenerale di Mediawiki",;
UnTranslatedTexts[ "MWLanguagesLegend" ] = "Lingue supportate";
MWGeneralConfigLegend: "Configurazione generale di Mediawiki",
UnTranslatedTexts[ "MWMessagesLegend" ] = "Messaggi di sistema";
MWLanguagesLegend: "Lingue supportate",
UnTranslatedTexts[ "MWExtensionsLegend" ] = "Estensioni Mediawiki";
MWMessagesLegend: "Messaggi di sistema",
UnTranslatedTexts[ "MWNamespacesLegend" ] = "Namespace";
MWExtensionsLegend: "Estensioni Mediawiki",
UnTranslatedTexts[ "MWMagicwordsLegend" ] = "Magic word";
MWNamespacesLegend: "Namespace",
UnTranslatedTexts[ "MWInterwikimapLegend" ] = "Tabella interwiki",
MWMagicwordsLegend: "Magic word",
UnTranslatedTexts[ "TAG_RESUME" ] = "Template",
MWInterwikimapLegend: "Tabella interwiki",
UnTranslatedTexts[ "USERMSG_RESUME" ] = "Avviso";
TAG_RESUME: "Template",
UnTranslatedTexts[ "EMPTY_RESUME" ] = "Svuotamento";
USERMSG_RESUME: "Avviso",
UnTranslatedTexts[ "USERTHANK_RESUME" ] = "Ringraziamento";
EMPTY_RESUME: "Svuotamento",
UnTranslatedTexts[ "BLOCKTEMPLATE" ] = "Blocco";
USERTHANK_RESUME: "Ringraziamento",
UnTranslatedTexts[ "RESUMESTART" ] = "[[WP:LRC|LiveRC]] : ";
BLOCKTEMPLATE: "Blocco",
UnTranslatedTexts[ "Comment" ] = "Personalizzazione per LiveRC";
RESUMESTART: "[[WP:LRC|LiveRC]]: ",
Comment: "Personalizzazione per LiveRC"
};
 
window.lstAverto = [ {
'template': 'Test',
{ 'template':'Test', 'string':'Test', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
'string': 'Test',
{ 'template':'Vandalismo', 'string':'Vandalismo', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
'hasPage': true,
{ 'template':'IP Vandalismo', 'string':'IP Vandalismo', 'hasPage':false, 'addName':false, 'addSectionTitle':false },
'addName': false,
{ 'template':'Avvisocopyviol', 'string':'Violazione di copyright', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
'addSectionTitle': true
{ 'template':'Avvisocopyviol|OTRS=no', 'string':'Violazione di copyright (no OTRS)', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
},
{ 'template':'Spam', 'string':'Spam', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
{
{ 'template':'Promozionale', 'string':'Promozionale', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
'template': 'Vandalismo',
{ 'template':'Senza senso', 'string':'Senza senso', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
'string': 'Vandalismo',
{ 'template':'Avvisoimmagine', 'string':'Immagine senza informazioni', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
'hasPage': true,
{ 'template':'Dati personali', 'string':'Dati personali', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
'addName': false,
{ 'template':'Benvenuto', 'string':'Benvenuto', 'hasPage':false, 'addName':false, 'addSectionTitle':false },
'addSectionTitle': true
{ 'template':'Grazie', 'string':'Grazie', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
},
{ 'template':'Oggetto', 'string':'Oggetto', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
{
{ 'template':'Yc', 'string':'Cartellino giallo', 'hasPage':false, 'addName':false, 'addSectionTitle':false },
'template': 'IP Vandalismo',
{ 'template':'WNB', 'string':'WNB', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
'string': 'IP Vandalismo',
{ 'template':'WND', 'string':'WND', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
'hasPage': false,
{ 'template':'WNF', 'string':'WNF', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
'addName': false,
{ 'template':'WNCV', 'string':'WNCV', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
'addSectionTitle': false
{ 'template':'WNRO', 'string':'WNRO', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
},
{ 'template':'Turpiloquio', 'string':'Turpiloquio', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
{
{ 'template':'Avvisoavvisi', 'string':'Avvisoavvisi', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
'template': 'Avvisocopyviol',
{ 'template':'Loggati', 'string':'Loggati', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
'string': 'Violazione di copyright',
{ 'template':'InvitoNPOV', 'string':'Invito NPOV', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
'hasPage': true,
{ 'template':'Avviso sport futuro', 'string':'Sport futuro', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
'addName': false,
{ 'template':'Avvisosenzafonti', 'string':'Senza fonti', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
'addSectionTitle': true
{ 'template':'AvvisoCommento', 'string':'Avviso Commento', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
},
{ 'template':'In italiano', 'string':'In italiano', 'hasPage':false, 'addName':false, 'addSectionTitle':true },
{
{ 'template':'Anteprima', 'string':'Anteprima', 'hasPage':false, 'addName':false, 'addSectionTitle':true },
'template': 'Avvisocopyviol|OTRS=no',
{ 'template':'Attacco', 'string':'Attacco', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
'string': 'Violazione di copyright (no OTRS)',
{ 'template':'ProposteCommenti', 'string':'ProposteCommenti', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
'hasPage': true,
{ 'template':'TempoRelativo', 'string':'TempoRelativo', 'hasPage':true, 'addName':false, 'addSectionTitle':true },
'addName': false,
{ 'template':'RimozioneContenuti', 'string':'RimozioneContenuti', 'hasPage':true, 'addName':false, 'addSectionTitle':true }
'addSectionTitle': true
},
{
'template': 'Spam',
'string': 'Spam',
'hasPage': true,
'addName': false,
'addSectionTitle': true
},
{
'template': 'Promozionale',
'string': 'Promozionale',
'hasPage': true,
'addName': false,
'addSectionTitle': true
},
{
'template': 'Senza senso',
'string': 'Senza senso',
'hasPage': true,
'addName': false,
'addSectionTitle': true
},
{
'template': 'Avvisoimmagine',
'string': 'Immagine senza informazioni',
'hasPage': true,
'addName': false,
'addSectionTitle': true
},
{
'template': 'Dati personali',
'string': 'Dati personali',
'hasPage': true,
'addName': false,
'addSectionTitle': true
},
{
'template': 'Benvenuto',
'string': 'Benvenuto',
'hasPage': false,
'addName': false,
'addSectionTitle': false
},
{
'template': 'Grazie',
'string': 'Grazie',
'hasPage': true,
'addName': false,
'addSectionTitle': true
},
{
'template': 'Oggetto',
'string': 'Oggetto',
'hasPage': true,
'addName': false,
'addSectionTitle': true
},
{
'template': 'Yc',
'string': 'Cartellino giallo',
'hasPage': false,
'addName': false,
'addSectionTitle': false
},
{
'template': 'WNB',
'string': 'WNB',
'hasPage': true,
'addName': false,
'addSectionTitle': true
},
{
'template': 'WND',
'string': 'WND',
'hasPage': true,
'addName': false,
'addSectionTitle': true
},
{
'template': 'WNF',
'string': 'WNF',
'hasPage': true,
'addName': false,
'addSectionTitle': true
},
{
'template': 'WNCV',
'string': 'WNCV',
'hasPage': true,
'addName': false,
'addSectionTitle': true
},
{
'template': 'WNRO',
'string': 'WNRO',
'hasPage': true,
'addName': false,
'addSectionTitle': true
},
{
'template': 'Turpiloquio',
'string': 'Turpiloquio',
'hasPage': true,
'addName': false,
'addSectionTitle': true
},
{
'template': 'Avvisoavvisi',
'string': 'Avvisoavvisi',
'hasPage': true,
'addName': false,
'addSectionTitle': true
},
{
'template': 'Loggati',
'string': 'Loggati',
'hasPage': true,
'addName': false,
'addSectionTitle': true
},
{
'template': 'InvitoNPOV',
'string': 'Invito NPOV',
'hasPage': true,
'addName': false,
'addSectionTitle': true
},
{
'template': 'Avviso sport futuro',
'string': 'Sport futuro',
'hasPage': true,
'addName': false,
'addSectionTitle': true
},
{
'template': 'Avvisosenzafonti',
'string': 'Senza fonti',
'hasPage': true,
'addName': false,
'addSectionTitle': true
},
{
'template': 'AvvisoCommento',
'string': 'Avviso Commento',
'hasPage': true,
'addName': false,
'addSectionTitle': true
},
{
'template': 'In italiano',
'string': 'In italiano',
'hasPage': false,
'addName': false,
'addSectionTitle': true
},
{
'template': 'Anteprima',
'string': 'Anteprima',
'hasPage': false,
'addName': false,
'addSectionTitle': true
},
{
'template': 'Attacco',
'string': 'Attacco',
'hasPage': true,
'addName': false,
'addSectionTitle': true
},
{
'template': 'ProposteCommenti',
'string': 'ProposteCommenti',
'hasPage': true,
'addName': false,
'addSectionTitle': true
},
{
'template': 'TempoRelativo',
'string': 'TempoRelativo',
'hasPage': true,
'addName': false,
'addSectionTitle': true
},
{
'template': 'RimozioneContenuti',
'string': 'RimozioneContenuti',
'hasPage': true,
'addName': false,
'addSectionTitle': true
}
];
 
// We insert the argument too. This is unusable on it.wiki
lstBando = new Array()[];
//window.lstBando = [
// { template: "W" , string: "W" , withDate: "$month $year" },
// { template: "S" , string: "S" , withDate: "" },
// { template: "P" , string: "P" , withDate: "$month $year" }
// ];
 
window.lstBlank = [ {
{ tooltip: "copyvio" , resume: "violazione di [[WP:CT|copyright]]" },
{tooltip: "sandbox" , resume: "sandboxcopyvio" },
},
{tooltip: "vandalismo" , resume: "vandalismo" }
{
];
tooltip: "sandbox",
resume: "sandbox"
window.lrcRevertMessages = [
},
{ resume: "Sandbox" , text: "Sandbox" },
{
{ resume: "Vandalismo" , text: "Vandalismo" },
tooltip: "vandalismo",
{ resume: "Senza fonte" , text: "Senza fonte" },
resume: "vandalismo"
{ resume: "Traduzione automatica" , text: "Traduzione automatica" }
}
];
 
lrcRevertMessages = [ {
// su it.wiki non usiamo template per richieste agli admin
resume: "Sandbox",
window.lstReport = [
text: "Sandbox"
// { userright:"delete",
},
// text:"REPORTING_DELETION",
{
// page:"MyWiki:Request for deletion/$year/$Month",
resume: "Vandalismo",
// template:"Template:Request for deletion/LiveRC",
text: "Vandalismo"
// parampage:true,
},
// paramuser:false,
{
// resume:"Request for deletion : $1",
resume: "Senza fonte",
// reasonsdropdownname:"deletereason-dropdown"
text: "Senza fonte"
// },
},
// { userright:"anyRight",
{
// text:"REPORTING_HELP",
resume: "Traduzione automatica",
// page:"MyWiki:New users forum",
text: "Traduzione automatica"
// template:"Template:New user needing help",
}
// parampage:false,
// paramuser:true,
// resume:"New user need help : $2",
// reasonsdropdownname:false
// }
];
window.commenttests = [
{ state: "REVERT" , icon:"RevertIcon", class:"RcRevert", regex: /LiveRC : Annullata la modifica|[Aa]nnullata la modifica|[Aa]nnullate le modifiche|[Aa]nnullata\]\] la modifica|Ripristino alla versione /, hide:false},
{ state: "BLANKING" , icon:"BlankingIcon", class:"RcBlanking", regex: /Pagina svuotata completamente/ , hide:false},
{ state: "REPLACED" , icon:"ReplacedIcon", class:"RcReplaced", regex: /Pagina sostituita con/ , hide:false},
{ state: "REDIRECTED" , icon:"RedirectedIcon", class:"RcRedirected", regex: /Redirect a |^#REDIRECT/, hide:false},
{ state: "WPCLEANER" , icon:"WPCIcon", class:"RcWPC", regex: /WPCleaner/, hide:false},
{ state: "AWB" , icon:"AWBIcon", class:"RcAWB", regex: /AWB|AutoWikiBrowser/, hide:false},
{ state: "HOTCAT" , icon:"HotCatIcon", class:"RcHotCat", regex: /HotCatsMulti|HotCat|Hotcat/, hide:false},
{ state: "LRC" , icon:"LRCIcon", class:"RcLRC", regex: /Live RC|LiveRC/, hide:false},
{ state: "POPUPS" , icon:"PopupsIcon", class:"RcPopups", regex: /(P|p)opup/, hide:false}
];
 
// su it.wiki non usiamo template per richieste agli admin
window.templatestests = [
lstReport = [
{ state: "PORTAIL" , icon:"" , class:"RcPortail" , template: "Portale" },
// { userright:"delete",
{ state: "RECENT" , icon:"RecentIcon" , class:"RcRecent" , template: "Recentismo" },
// text:"REPORTING_DELETION",
{ state: "COPYRIGHT" , icon:"CopyrightIcon", class:"RcCopyright", template: "ViolazioneCopyright" },
// page:"MyWiki:Request for deletion/$year/$Month",
{ state: "COPYRIGHT" , icon:"CopyrightIcon", class:"RcCopyright", template: "Copyvio" },
// template:"Template:Request for deletion/LiveRC",
{ state: "COPYRIGHT" , icon:"CopyrightIcon", class:"RcCopyright", template: "Copyviol" },
// parampage:true,
{ state: "COPYRIGHT" , icon:"CopyrightIcon", class:"RcCopyright", template: "Cancelcopy" },
// paramuser:false,
{ state: "WIP" , icon:"WIPIcon" , class:"RcWIP" , template: "WIP" },
// resume:"Request for deletion : $1",
{ state: "WIP" , icon:"WIPIcon" , class:"RcWIP" , template: "WIP open" }
// reasonsdropdownname:"deletereason-dropdown"
// },
// { userright:"anyRight",
// text:"REPORTING_HELP",
// page:"MyWiki:New users forum",
// template:"Template:New user needing help",
// parampage:false,
// paramuser:true,
// resume:"New user need help : $2",
// reasonsdropdownname:false
// }
];
 
commenttests = [ {
window.categoriestests = [
state: "REVERT",
{ state: "ADQ" , icon:"AdQIcon" , class:"RcADQ", regex: /Voci in vetrina - /},
icon: "RevertIcon",
{ state: "BA" , icon:"BAIcon" , class:"RcBA", regex: /Voci di qualità - /},
class: "RcRevert",
{ state: "STUB" , icon:"StubIcon" , class:"RcStub", regex: /Stub - /},
regex: /LiveRC : Annullata la modifica|[Aa]nnullata la modifica|[Aa]nnullate le modifiche|[Aa]nnullata\]\] la modifica|Ripristino alla versione /,
{ state: "COPYRIGHT" , icon:"CopyrightIcon", class:"RcCopyright", regex: /(Sospette violazioni di copyright|Cancellare subito)/},
hide: false
{ state: "PAS" , icon:"PaSIcon" , class:"RcPaS", regex: / in cancellazione /}
},
{
state: "BLANKING",
icon: "BlankingIcon",
class: "RcBlanking",
regex: /Pagina svuotata completamente/,
hide: false
},
{
state: "REPLACED",
icon: "ReplacedIcon",
class: "RcReplaced",
regex: /Pagina sostituita con/,
hide: false
},
{
state: "REDIRECTED",
icon: "RedirectedIcon",
class: "RcRedirected",
regex: /Redirect a |^#REDIRECT/,
hide: false
},
{
state: "WPCLEANER",
icon: "WPCIcon",
class: "RcWPC",
regex: /WPCleaner/,
hide: false
},
{
state: "AWB",
icon: "AWBIcon",
class: "RcAWB",
regex: /AWB|AutoWikiBrowser/,
hide: false
},
{
state: "HOTCAT",
icon: "HotCatIcon",
class: "RcHotCat",
regex: /HotCatsMulti|HotCat|Hotcat/,
hide: false
},
{
state: "LRC",
icon: "LRCIcon",
class: "RcLRC",
regex: /Live RC|LiveRC/,
hide: false
},
{
state: "POPUPS",
icon: "PopupsIcon",
class: "RcPopups",
regex: /(P|p)opup/,
hide: false
}
];
 
templatestests = [ {
// su it.wiki, al momento, non abbiamo questo genere di categorie
state: "PORTAIL",
// window.watchCategories = [
icon: "",
// { state: "SCOLARIP" , icon:"ScolarIPIcon" , class:"RcScolarIP", category: "Indirizzi IP scolastici"},
class: "RcPortail",
// { state: "SHAREDIP" , icon:"SharedIPIcon" , class:"RcSharedIP", category: "Indirizzi IP condivisi"},
template: "Portale"
// { state: "COPYRIGHTUSER" , icon:"CopyrightUserIcon" , class:"RcCopyrightUser", category: "Utenti copyviler"},
},
// { state: "PEDIAPROJECT" , icon:"PediaProjectIcon" , class:"RcPediaProject", category: "Utenti di progetti scolastici"}
{
state: "RECENT",
icon: "RecentIcon",
class: "RcRecent",
template: "Recentismo"
},
{
state: "COPYRIGHT",
icon: "CopyrightIcon",
class: "RcCopyright",
template: "ViolazioneCopyright"
},
{
state: "COPYRIGHT",
icon: "CopyrightIcon",
class: "RcCopyright",
template: "Copyvio"
},
{
state: "COPYRIGHT",
icon: "CopyrightIcon",
class: "RcCopyright",
template: "Copyviol"
},
{
state: "COPYRIGHT",
icon: "CopyrightIcon",
class: "RcCopyright",
template: "Cancelcopy"
},
{
state: "WIP",
icon: "WIPIcon",
class: "RcWIP",
template: "WIP"
},
{
state: "WIP",
icon: "WIPIcon",
class: "RcWIP",
template: "WIP open"
}
];
 
categoriestests = [ {
state: "ADQ",
icon: "AdQIcon",
class: "RcADQ",
regex: /Voci in vetrina - /
},
{
state: "BA",
icon: "BAIcon",
class: "RcBA",
regex: /Voci di qualità - /
},
{
state: "STUB",
icon: "StubIcon",
class: "RcStub",
regex: /Stub - /
},
{
state: "COPYRIGHT",
icon: "CopyrightIcon",
class: "RcCopyright",
regex: /(Sospette violazioni di copyright|Cancellare subito)/
},
{
state: "PAS",
icon: "PaSIcon",
class: "RcPaS",
regex: / in cancellazione /
}
];
 
// su it.wiki, al momento, non abbiamo questo genere di categorie
// watchCategories = [
// { state: "SCOLARIP" , icon:"ScolarIPIcon" , class:"RcScolarIP", category: "Indirizzi IP scolastici"},
// { state: "SHAREDIP" , icon:"SharedIPIcon" , class:"RcSharedIP", category: "Indirizzi IP condivisi"},
// { state: "COPYRIGHTUSER" , icon:"CopyrightUserIcon" , class:"RcCopyrightUser", category: "Utenti copyviler"},
// { state: "PEDIAPROJECT" , icon:"PediaProjectIcon" , class:"RcPediaProject", category: "Utenti di progetti scolastici"}
// ];
 
// Estensioni
LiveRC_DeleteExtension( "UserWarningsExtension" );
LiveRC_DeleteExtension( "LinkOnIconExtension" );
LiveRC_DeleteExtension( "InserisciTemplate" );
LiveRC_DeleteExtension( "DiffExtension" );
LiveRC_DeleteExtension( "InstallAndConfigLiveRCExtension" );
 
var MyExtension = new Object(){};
MyExtension[ "name" ] = "InserisciTemplate";
MyExtension[ "url" ] = "//it.wikipedia.org/w/index.php?title=MediaWiki:Gadget-LiveRC_1x.js/InserisciTemplate.js";
MyExtension[ "desc" ] = "Inserisce un template di avviso in cima alla voce";
MyExtension[ "neededright" ] = "";
LiveRC_AddNewExtension( MyExtension );
}catch(e){ }
}
window.LiveRC_getSiteCustom = LiveRC_getSiteCustom;
//</source>