Acciones

MediaWiki

Diferencia entre revisiones de «Gadget-HotCat.js»

De La Venciclopedia

imported>Lizardkg
(Página nueva: /** Import module ************************************************************* * * Description: Includes a raw wiki page as javascript or CSS, * used for inclu...)
mSin resumen de edición
 
(No se muestran 4 ediciones intermedias de 2 usuarios)
Línea 1: Línea 1:
/** Import module *************************************************************
window.hotcat_translations_from_commons = true;
  *
 
  * Description: Includes a raw wiki page as javascript or CSS,
/*
  *              used for including user made modules.
This imports the latest version of HotCat from Commons.
  * Maintainers: [[User:TheDJ]]
  HotCat is a gadget to make changes to categories much easier.
  */
  Full documentation can be found at http://commons.wikimedia.org/wiki/Help:Gadget-HotCat
importedScripts = {}; // object keeping track of included scripts, so a script ain't included twice
*/
function importScript( page ) {
mw.loader.load( '//commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-HotCat.js&action=raw&ctype=text/javascript' );
    if( importedScripts[page] ) {
        return;
    }
    importedScripts[page] = true;
    var url = wgScriptPath
            + '/index.php?title='
            + encodeURIComponent( page.replace( / /g, '_' ) )
            + '&action=raw&ctype=text/javascript';
    var scriptElem = document.createElement( 'script' );
    scriptElem.setAttribute( 'src' , url );
    scriptElem.setAttribute( 'type' , 'text/javascript' );
    document.getElementsByTagName( 'head' )[0].appendChild( scriptElem );
}
importScript('Usuario:Carmen/Gadget-HotCat.js')

Revisión actual - 04:25 6 sep 2020

window.hotcat_translations_from_commons = true;

/*
 This imports the latest version of HotCat from Commons.
 HotCat is a gadget to make changes to categories much easier.
 Full documentation can be found at http://commons.wikimedia.org/wiki/Help:Gadget-HotCat
*/
mw.loader.load( '//commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-HotCat.js&action=raw&ctype=text/javascript' );