« MediaWiki:Common.js » : différence entre les versions
Aller à la navigation
Aucun résumé des modifications |
m (Révocation des modifications de Hudra (discussion) vers la dernière version de Andimion) |
||
Ligne 1 : | Ligne 1 : | ||
if ($('.item_container').length!==0) { | if ($('.item_container').length!==0) { | ||
$('.item_container').each(function() { | $('.item_container').each(function() { | ||
$(this).append('<img src=" | $(this).append('<img src="' + $(this).attr('data-url').replace('westfrs','westfr') + '">'); | ||
}); | }); | ||
$('.item_container[data-link]').each(function(){ | $('.item_container[data-link]').each(function() { | ||
$(this).find('img').wrap('<a href="'+$(this).attr('data-link')+'"></a>'); | $(this).find('img').wrap('<a href="' + $(this).attr('data-link') + '"></a>'); | ||
}); | }); | ||
$(function() { | $(function() { | ||
Ligne 11 : | Ligne 10 : | ||
}); | }); | ||
} | } | ||
if ($('#navbar').length !== 0) { | if ($('#navbar').length !== 0) { | ||
$('#navbar a').removeAttr("title"); | $('#navbar a').removeAttr("title"); | ||
} | } | ||
// Embed youtube videos | // Embed youtube videos | ||
if ($('.youtube_video').length !== 0) { | if ($('.youtube_video').length !== 0) { | ||
Ligne 34 : | Ligne 20 : | ||
}); | }); | ||
} | } | ||
Version du 1 décembre 2018 à 14:47
if ($('.item_container').length!==0) { $('.item_container').each(function() { $(this).append('<img src="' + $(this).attr('data-url').replace('westfrs','westfr') + '">'); }); $('.item_container[data-link]').each(function() { $(this).find('img').wrap('<a href="' + $(this).attr('data-link') + '"></a>'); }); $(function() { $.getScript("https://wiki.the-west.fr/wiki/Popup.js?action=raw"); }); } if ($('#navbar').length !== 0) { $('#navbar a').removeAttr("title"); } // 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>'); }); }