MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
(Experiment: replace image rather than broken link for APLcart) |
(Remove old APLcart code) |
||
Line 4: | Line 4: | ||
mw.loader.load('/w/index.php?title=MediaWiki:LeadingAndTrailingCells.js&action=raw&ctype=text/javascript'); | mw.loader.load('/w/index.php?title=MediaWiki:LeadingAndTrailingCells.js&action=raw&ctype=text/javascript'); | ||
}); | }); | ||
} | } | ||
if ($('.image[href="/wiki/File:APLcart.png"]').length) { | if ($('.image[href="/wiki/File:APLcart.png"]').length) { | ||
$('.image[href="/wiki/File:APLcart.png"]').replaceWith('<iframe src="https://aplcart.info?w" style="height:38vh;width:calc(100% - 4px)">'); | $('.image[href="/wiki/File:APLcart.png"]').replaceWith('<iframe src="https://aplcart.info?w" style="height:38vh;width:calc(100% - 4px)">'); | ||
$('.internal[href="/wiki/File:APLcart.png"]').attr('href', 'https://aplcart.info | $('.internal[href="/wiki/File:APLcart.png"]').attr('href', 'https://aplcart.info?w'); | ||
$('.thumbinner').css('width','38vw'); | $('.thumbinner').css('width','38vw'); | ||
} | } |
Revision as of 09:10, 19 March 2020
if ($(".LeadingAndTrailingCells").length) { mw.loader.getScript('/w/index.php?title=MediaWiki:D3.v5.min.js&action=raw&ctype=text/javascript') .then(function() { mw.loader.load('/w/index.php?title=MediaWiki:LeadingAndTrailingCells.js&action=raw&ctype=text/javascript'); }); } if ($('.image[href="/wiki/File:APLcart.png"]').length) { $('.image[href="/wiki/File:APLcart.png"]').replaceWith('<iframe src="https://aplcart.info?w" style="height:38vh;width:calc(100% - 4px)">'); $('.internal[href="/wiki/File:APLcart.png"]').attr('href', 'https://aplcart.info?w'); $('.thumbinner').css('width','38vw'); } if ($('[title="File:Ngn/apl"]').length) { $('[title="File:Ngn/apl"]').replaceWith('<iframe src="https://n9n.gitlab.io/apl/web/" style="height:350px;width:calc(100% - 4px)">'); $('.thumbinner').css('width',''); }