« MediaWiki:Common.js » : différence entre les versions
Aller à la navigation
Aucun résumé des modifications |
Aucun résumé des modifications |
||
Ligne 1 : | Ligne 1 : | ||
$('.tbbox-logo').wrap('<a href="/wiki/Accueil"></a>'); | $('.tbbox-logo').wrap('<a href="/wiki/Accueil"></a>'); | ||
if ($('.item_container').length!==0) { | if ($('.item_container').length!==0) { | ||
$.getScript("https://wiki.the-west.fr/wiki/Popup.js?action=raw"); | |||
$('.item_container').each(function() { | $('.item_container').each(function() { | ||
$(this).append('<img src="https://westfr.innogamescdn.com/images/items/' + $(this).attr('data-url') + '">'); | $(this).append('<img src="https://westfr.innogamescdn.com/images/items/' + $(this).attr('data-url') + '">'); |
Version du 26 décembre 2018 à 08:12
$('.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') + '">'); }); } if ($('#navbar').length !== 0) { $('#navbar 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>'); }); } // Images externes if ($('.external_img').length !== 0) { $('.external_img').each(function() { $(this).html('<img style="max-width:100%;max-height:100%;" src="' + $(this).attr('data-url') + '"/>'); }); }