MediaWiki:Common.js: Difference between revisions
From Screamer Wiki
(Created page with "→Any JavaScript here will be loaded for all users on every page load.: $("#iframeloader-GoodIntentions").replaceWith('<iframe src=https://www.bitchute.com/embed/UNBNbGMM1B...") |
No edit summary |
||
Line 4: | Line 4: | ||
$("#iframeloader-JingleBellsReversed").replaceWith('<iframe src=https://www.bitchute.com/embed/gyxTQDvlDDay/ WIDTH=480 HEIGHT=360>'); | $("#iframeloader-JingleBellsReversed").replaceWith('<iframe src=https://www.bitchute.com/embed/gyxTQDvlDDay/ WIDTH=480 HEIGHT=360>'); | ||
$("#iframeloader-ChrisTheJackOLantern").replaceWith('<iframe src=https://www.bitchute.com/embed/BzK2JS21Ng5l/ WIDTH=480 HEIGHT=360>'); | $("#iframeloader-ChrisTheJackOLantern").replaceWith('<iframe src=https://www.bitchute.com/embed/BzK2JS21Ng5l/ WIDTH=480 HEIGHT=360>'); | ||
$("#Attributions").replaceWith('<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.'); | |||
/* BitChute Player (adapted from YouTube player .js) */ | /* BitChute Player (adapted from YouTube player .js) */ | ||
mw.hook('wikipage.content').add(function($content) { | mw.hook('wikipage.content').add(function($content) { |
Revision as of 22:20, 19 August 2019
/* Any JavaScript here will be loaded for all users on every page load. */
$("#iframeloader-GoodIntentions").replaceWith('<iframe src=https://www.bitchute.com/embed/UNBNbGMM1B1q/ WIDTH=480 HEIGHT=360>');
$("#iframeloader-ABabyToy").replaceWith('<iframe src=https://www.bitchute.com/embed/7ONLxUCacy4c/ WIDTH=480 HEIGHT=360>');
$("#iframeloader-JingleBellsReversed").replaceWith('<iframe src=https://www.bitchute.com/embed/gyxTQDvlDDay/ WIDTH=480 HEIGHT=360>');
$("#iframeloader-ChrisTheJackOLantern").replaceWith('<iframe src=https://www.bitchute.com/embed/BzK2JS21Ng5l/ WIDTH=480 HEIGHT=360>');
$("#Attributions").replaceWith('<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.');
/* BitChute Player (adapted from YouTube player .js) */
mw.hook('wikipage.content').add(function($content) {
$content.find('.bitchuteplayer:not(.loaded)').each(function() {
var $this = $(this),
data = $this.data(),
uri = new mw.Uri('https://www.bitchute.com/embed/'),
id = String(data.id || '').trim();
if (id === '') {
console.warn('[BitChute Player] Video ID is not defined.');
return;
}
uri.path += id;
$this.html(
$('<iframe>', {
width: String(data.width || '').trim(),
height: String(data.height || '').trim(),
src: uri.toString(),
})
).addClass('loaded');
});
});