MediaWiki:Common.js: Difference between revisions
Jump to navigation
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
if ($('.item_container') | if ($('.item_container').length!==0) { | ||
$('.item_container').each(function() { | $('.item_container').each(function() { | ||
$(this).append('<img src="' + $(this).attr('data-url') + '">'); | $(this).append('<img src="' + $(this).attr('data-url') + '">'); | ||
Line 10: | Line 10: | ||
$.getScript("https://wiki.the-west.net/wiki/Popup.js?action=raw"); | $.getScript("https://wiki.the-west.net/wiki/Popup.js?action=raw"); | ||
}); | }); | ||
} | } |
Revision as of 20:28, 31 August 2017
/* Any JavaScript here will be loaded for all users on every page load. */ if ($('.item_container').length!==0) { $('.item_container').each(function() { $(this).append('<img src="' + $(this).attr('data-url') + '">'); }) $('.item_container[data-link]').each(function(){ $(this).find('img').wrap('<a href="'+$(this).attr('data-link')+'"></a>'); }); $(function() { $.getScript("https://wiki.the-west.net/wiki/Popup.js?action=raw"); }); }