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

Contenuto cancellato Contenuto aggiunto
Nessun oggetto della modifica
ValterVBot (discussione | contributi)
m tag source deprecati, replaced: <source lang= → <syntaxhighlight lang= (4), </source> → </syntaxhighlight> (4)
 
(9 versioni intermedie di 4 utenti non mostrate)
Riga 9:
|----------
|
<sourcesyntaxhighlight lang="javascript" line>
// Estensioni
LiveRC_DeleteExtension("UserWarningsExtension");
Riga 21:
MyExtension["desc"] = "Inserisce un template di avviso in cima alla voce";
LiveRC_AddNewExtension(MyExtension);
</syntaxhighlight>
</source>
|--------
! After
|--------
| valign="top" |
<sourcesyntaxhighlight lang="javascript" line>
// Estensioni
LiveRC_DeleteExtension("UserWarningsExtension");
Riga 38:
MyExtension["desc"] = "Inserisce un template di avviso in cima alla voce";
LiveRC_AddNewExtension(MyExtension);
</syntaxhighlight>
</source>
|}
 
Riga 51:
::Deleted. Thanks '''''<span style="font-size:medium;font-family:Comic Sans MS">[[Utente:Jalo|<span style="color:#BB0011">J</span>]][[Discussioni utente:Jalo|<span style="font-size:small;color:#DD2233">alo</span>]]</span>''''' 09:12, 4 ago 2014 (CEST)
 
== Extensions appears according to userrights ==
== Version management ==
 
{{ping|Jalo|Supernino}}
 
Hello,
 
I just added a new item for lrcExtension ([https://fr.wikipedia.org/w/index.php?title=MediaWiki%3AGadget-LiveRC.js&diff=107762792&oldid=107762143] [https://fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget-LiveRC-frWP.js&diff=107762586&oldid=107419352]).
since a quite long time, LiveRC has a system of version management that checks the version of the code between the number given in the javascript code and the wikitext given through the "template" [[:fr:Wikipédia:LiveRC/Version]]. If there is a difference, that meant that the javascript is obsolete and the browser cache has to be purged.
 
Your local config must be updated (line 5) :
This was only available at fr-wiki, since a template cannot be transclude accross wikis. But now, I just changed this using wikidata.
{| class="wikitable"
The stable version is now declared at [[:d:Q7027060#claims]], so it can be used on any WMF wiki.
! BEFORE
|------
|
<syntaxhighlight lang=javascript line>
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";
 
LiveRC_AddNewExtension(MyExtension);
</syntaxhighlight>
|------
! AFTER
|------
|
<syntaxhighlight lang=javascript line>
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);
</syntaxhighlight>
|}
This new <code>neededright</code> item is used to prevent the extension to be shown on the list if the user don't have the corresponding right (of if he does have it in the case where the neededright value if prefixed with <code>!</code> ).
 
[[Utente:Dr Brains|Dr Brains]] ([[Discussioni utente:Dr Brains|msg]]) 1520:0607, 1026 agoset 2014 (CEST)
:{{Fatto}}. Thanks '''''<span style="font-size:medium;font-family:Comic Sans MS">[[Utente:Jalo|<span style="color:#BB0011">J</span>]][[Discussioni utente:Jalo|<span style="font-size:small;color:#DD2233">alo</span>]]</span>''''' 09:25, 29 set 2014 (CEST)
 
== RegExp ==
 
 
Hello,
 
{{ping|Jalo}}
 
'''1.)'''
 
Since [//fr.wikipedia.org/w/index.php?title=MediaWiki:Gadget-LiveRC.js&diff=107959155&oldid=107867966 this edit], LiveRC handle <code>commenttests[X].regex</code> and <code>categoriestests[X].regex</code> as Regexp, not Strings. Config panel code has been updated to manage this.
 
A dedicated code has been added in <code>LiveRC_getSpecialCustom()</code> to do the conversion, but it would be better you update these params.
 
'''2.)'''
 
Has you may have seen, there is a new extension, [[fr:Wikipédia:LiveRC/Documentation/Extensions/InstallAndConfigLiveRCExtension/en|InstallAndConfigLiveRCExtension]]. Its purpose is to help managing the LiveRC installation (means : auto edit of the installation page, here [[MediaWiki:Gadget-LiveRC 1x.js]], with a config panel like the one in LiveRC but with some more configs). But as here LiveRC is only active in its launching page, you may want to delete it from the list.
 
'''3.)'''
 
Some fr-wikipedia specific extensions have been moved from [[:fr:Wikipédia:LiveRC/Miroir#Extensions|the main code]] to the [[:fr:MediaWiki:Gadget-LiveRC-frWP.js|fr-wikipedia configuration page]]. You may have no need to delete them anymore.
 
'''4.)'''
So, to get this feature, you have to add this wikitext anywhere in [[Wikipedia:LiveRC]] :
 
You can now set some site-custom CSS using [[MediaWiki:Gadget-LiveRC-local.css]] (you can change the page name by setting <code>LiveRC_Config["CSSPage"]</code> <u>before you load LiveRC main code</u>).
'''<code><nowiki><span style="display:none;"><span id="currentVersion">{{#property:P348|of=Q7027060}}</span></span></nowiki></code>'''
 
[[Utente:Dr Brains|Dr Brains]] ([[Discussioni utente:Dr Brains|msg]]) 20:55, 9 ott 2014 (CEST)
Once done, you will see that the version number, near the central LiveRC logo, becomes green (that means the version in the js matches the version at wikidata). And if the versions doesn't match (wikidata version is updated but you still use old js because of the cache), you'll get an error message (you still can run LiveRC).
:Done. Thank you again '''''<span style="font-size:medium;font-family:Comic Sans MS">[[Utente:Jalo|<span style="color:#BB0011">J</span>]][[Discussioni utente:Jalo|<span style="font-size:small;color:#DD2233">alo</span>]]</span>''''' 09:13, 10 ott 2014 (CEST)
 
== wgPageName ==
For the same reason, you can delete the langlinks written at the end of [[Wikipedia:LiveRC]].
 
Deprecato, usare mw.config.get('wgPageName') al suo posto. Grazie in anticipo, --<span style="font-variant:small-caps">[[Utente:Ricordisamoa|<span style="color:#004B70">Ricordi</span>]][[Discussioni utente:Ricordisamoa|<span style="color:#00703E">samoa</span>]]</span> 18:29, 22 mar 2016 (CET)
[[Utente:Dr Brains|Dr Brains]] ([[Discussioni utente:Dr Brains|msg]]) 15:06, 10 ago 2014 (CEST)
: Fatto da [[Utente:Supernino|Supernino]], annullato da [[Utente:Amarvudol|Amarvudol]] --<span style="font-variant:small-caps">[[Utente:Ricordisamoa|<span style="color:#004B70">Ricordi</span>]][[Discussioni utente:Ricordisamoa|<span style="color:#00703E">samoa</span>]]</span> 17:30, 23 mar 2016 (CET)
:: [[File:Yes_check.svg|15px|✔]] Fatto --<span style="font-family:Comic Sans MS;">'''[[Utente:Supernino|<span style="color:darkblue;">Super</span>]][[Discussioni utente:Supernino|<span style="color:darkblue;">nino</span>]]'''</span> 18:59, 23 mar 2016 (CET)
Ritorna alla pagina "Gadget-LiveRC 1x.js".