« MediaWiki:Common.js » : différence entre les versions

De Les Archives de Vault-Tec
Kharmitch (discussion | contributions)
m Désactivation temporaire des scripts FANCY TOOLTIPS et SHOW/HIDE
Kharmitch (discussion | contributions)
m A protégé « MediaWiki:Common.js » : Vandalisme excessif ([Modifier=Autoriser uniquement les administrateurs] (infini) [Renommer=Autoriser uniquement les administrateurs] (infini))
(Aucune différence)

Version du 1 août 2021 à 10:42

/* Tout JavaScript ici sera chargé pour chaque page visitée par n’importe quel utilisateur. */

/* ######################################################################## */
/* ### FANCY TOOLTIPS (Template:Icon, Template:Infobox,                 ### */
/* ###                 Template:Tooltip)                                ### */
/* ### ---------------------------------------------------------------- ### */
/* ### Description: Nicer-looking tooltips using jQuery.tipsy           ### */
/* ### Credit:      User:Porter21     THE VAULT                         ### */
/* ######################################################################## */
 /*
function fancyTooltips () {
   var ftTooltipsE = $('.va-infobox-tooltip-cell');
   var ftTooltipsS = $('.va-icon, .va-tooltip');
 
   if (ftTooltipsE.length || ftTooltipsS.length) {
      mw.loader.using('jquery.tipsy', function () {
         if (ftTooltipsE.length) {
            // Tooltip appears to the left of the element
            ftTooltipsE.tipsy({gravity: 'e'});
         }
         if (ftTooltipsS.length) {
            // Tooltip appears above the element
            ftTooltipsS.tipsy({gravity: 's'});
         }
      });
   }
}*/

/* ######################################################################## */
/* ### SHOW/HIDE                                                        ### */
/* ### ---------------------------------------------------------------- ### */
/* ### Description: Collapsible tables using jQuery. Allows tables to   ### */
/* ###              be collapsed, showing only the header.              ### */
/* ### Credit:      User:Dantman                                        ### */
/* ### Disclaimer:  See http://dev.wikia.com/wiki/ShowHide/code.js      ### */
/* ######################################################################## */
 
 /*
function importScriptPage (page, server)
{
	var url = '/index.php?title=' + encodeURIComponent(page.replace(/ /g,'_')).replace('%2F','/').replace('%3A',':') + '&action=raw&ctype=text/javascript';
	if (typeof server == "string") url = (server.indexOf('://') == -1)?'http://' + server + '.wikia.com' + url:server + url;
	return mw.loader.load(url);
}

var ShowHideConfig = { autoCollapse: 1, userLang: false };
importScriptPage( 'ShowHide/code.js', 'dev' );*/

/* ######################################################################## */
/* ### IMAGEMAPEDIT                                                     ### */
/* ### ---------------------------------------------------------------- ### */
/* ### Description: permet de connaître les coordonnées d'une image.    ### */
/* ###              utile pour imagemap                                 ### */
/* ######################################################################## */

if (mw.config.get('wgNamespaceNumber')==6 && mw.config.get('wgAction')=='view') {
	mw.loader.load('//tools.wmflabs.org/imagemapedit/ime.js');
}