Discussioni MediaWiki:Gadget-LiveRC 1x.js


Ultimo commento: 11 anni fa, lasciato da Dr Brains in merito all'argomento Version management

InserisciTemplate extension : integration to LiveRC

Hello,

because I adapted InserisciTemplate extension to fr-wiki, I'd want to add it in the extension list (see here the future edit). To prevent it to appear in your own extension list, you may do the modification above (line 5), to be sure to delete the fr installation of this extension (other way your own version will no be installed).

Before
        // Estensioni
        LiveRC_DeleteExtension("UserWarningsExtension");
        LiveRC_DeleteExtension("LinkOnIconExtension");
        LiveRC_DeleteExtension("BandeauPortail");
 

        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);
After
        // Estensioni
        LiveRC_DeleteExtension("UserWarningsExtension");
        LiveRC_DeleteExtension("LinkOnIconExtension");
        LiveRC_DeleteExtension("BandeauPortail");
        LiveRC_DeleteExtension("InserisciTemplate");
 
        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);

Please warn me when it is done, and I'll proceed. Thank you.

Note : In the way LiveRC is installed here, with LiveRC code only active at Wikipedia:LiveRC, DiffExtension is useless. You may delete it too.

Ping : [@ Jalo, Supernino]

Dr Brains (msg) 22:36, 2 ago 2014 (CEST)Rispondi

[@ Dr Brains] Done. I'll let Jalo take care of DiffExtension. --Supernino 06:21, 3 ago 2014 (CEST)Rispondi
Deleted. Thanks Jalo 09:12, 4 ago 2014 (CEST)Rispondi

Version management

[@ Jalo, Supernino]

Hello,

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.

This was only available at fr-wiki, since a template cannot be transclude accross wikis. But now, I just changed this using wikidata. The stable version is now declared at d:Q7027060#claims, so it can be used on any WMF wiki.

So, to get this feature, you have to add this wikitext anywhere in Wikipedia:LiveRC :

<span style="display:none;"><span id="currentVersion">{{#property:P348|of=Q7027060}}</span></span>

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).

For the same reason, you can delete the langlinks written at the end of Wikipedia:LiveRC.

Dr Brains (msg) 15:06, 10 ago 2014 (CEST)Rispondi

Ritorna alla pagina "Gadget-LiveRC 1x.js".