Differenze tra le versioni di "MediaWiki:Common.js"

m
This should get the job done, but I'm not sure
m (Fixed spelling, for pignolone)
m (This should get the job done, but I'm not sure)
***************************************************/
 
mw.loader.using( ['jquery.cookie'] ).then( function ($) {
var sitenotice = {
cookieName: 'sitenotice-displayed-count',
HTML: '<div class="sitenotice width-xl-80 width-lg-90 width-md-100" style="position: relative;"><a href="/Pok%C3%A9mon:_Let\'s_Go,_Pikachu!_e_Let\'s_Go,_Eevee!" target="_blank">Pokémon: Let\'s Go, Pikachu! e Let\'s Go, Eevee!</a> sono ora disponibili! <span style="font-weight: bold;">Scopri come puoi aiutarci con l\'aggiornamento <a href="//forum.pokemoncentral.it/threads/27188/" target="_blank">sul forum</a></span>!</div>',
maxDisplayCount: 5,
 
getCookie: function() {
var sitenotice = {
return parseInt($.cookie(this.cookieName) || 0);
cookieName: 'sitenotice-displayed-count',
},
HTML: '<div class="sitenotice width-xl-80 width-lg-90 width-md-100" style="position: relative;"><a href="/Pok%C3%A9mon:_Let\'s_Go,_Pikachu!_e_Let\'s_Go,_Eevee!" target="_blank">Pokémon: Let\'s Go, Pikachu! e Let\'s Go, Eevee!</a> sono ora disponibili! <span style="font-weight: bold;">Scopri come puoi aiutarci con l\'aggiornamento <a href="//forum.pokemoncentral.it/threads/27188/" target="_blank">sul forum</a></span>!</div>',
maxDisplayCount: 5,
getCookie: function() {
return parseInt($.cookie(this.cookieName) || 0);
},
updateCookie: function(currValue) {
$.cookie(this.cookieName, currValue + 1, {path: '/'});
return this;
},
display: function() {
$(this.HTML).prependTo('#content');
return this;
}
};
 
updateCookie: function(currValue) {
if (sitenotice.HTML !== '') {
$.cookie(this.cookieName, currValue + 1, {path: '/'});
var displayedCount = sitenotice.getCookie();
return this;
},
 
display: function() {
if (displayedCount < sitenotice.maxDisplayCount) {
$(this.HTML).prependTo('#content');
sitenotice.updateCookie(displayedCount)
return this;
.display();
}
}
};
}
 
if (sitenotice.HTML !== '') {
})(jQuery);
var displayedCount = sitenotice.getCookie();
 
if (displayedCount < sitenotice.maxDisplayCount) {
sitenotice.updateCookie(displayedCount).display();
}
}
} );
 
/***************************************************
 
RLQ.push(function() {
// Zebra Tooltips
mw.loader.load('/index.php?title=MediaWiki:Zebra_Tooltips.js&action=raw&ctype=text/javascript');
mw.loader.load('https://cdn.jsdelivr.net/npm/[email protected]/dist/css/default/zebra_tooltips.min.css', 'text/css');