Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/* ==============
Quiz Extension
==============
$(function () {
$('#WikiaRail').prepend("<div data-tf-widget='QBWZBDhR' style='width:100%;height:700px;'></div><script src='//embed.typeform.com/next/embed.js'></script>");
}); */
/* ===================
DC Universe/YJO
Right rail module
This code is temporary.
Based on [[w:c:dev:AdoptMe.js]]
=================== */
var rightRailModules = {
config: {
loadOnNamespaces: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],
locales: {
image: {
"en": "//images.wikia.nocookie.net/czech-prey-out/images/b/bf/Diablo-Art.jpg"
},
altText: {
"en": "Are you the ultimate DIABLO fan? Enter our contest to win big prizes!"
},
url: {
"en": "https://brand.fandom.com/diablo"
}
}
},
checkRail: 0,
adoptImage: "",
adoptAltText: "",
adoptUrl: "",
localizeModules: function() {
var contentLanguage = wgContentLanguage,
localizedAdoptImage = typeof this.config.locales.image[contentLanguage] !== "undefined" ? this.config.locales.image[contentLanguage] : this.config.locales.image["en"];
localizedAltText = typeof this.config.locales.altText[contentLanguage] !== "undefined" ? this.config.locales.altText[contentLanguage] : this.config.locales.altText["en"];
localizedUrl = typeof this.config.locales.url[contentLanguage] !== "undefined" ? this.config.locales.url[contentLanguage] : this.config.locales.url["en"];
this.adoptImage = localizedAdoptImage;
this.adoptAltText = localizedAltText;
this.adoptUrl = localizedUrl;
},
addModules: function() {
var railHasLoaded = $("#WikiaRail .rail-module").length > 0;
if (railHasLoaded) {
clearInterval(this.checkRail);
this.addCTABanner();
}
},
addCTABanner: function() {
var addBefore = $('.main-container'),
bannerHTML = '<div class="cta-banner" style="margin: 15px auto; text-align:center;"><a href="' + this.adoptUrl + '"><img alt="' + this.adoptAltText + '" src="' + this.adoptImage + '"></a></div>';
addBefore.before(bannerHTML);
},
init: function() {
var thisObject = this;
if (($.inArray(mw.config.get('wgNamespaceNumber'), this.config.loadOnNamespaces) > -1) && !mw.config.get('wgIsMainPage')) {
this.localizeModules();
this.checkRail = setInterval(function() { thisObject.addModules(); }, 750);
}
}
}
$(function() {
rightRailModules.init();
});
/* ===================
Diablo contest end
=================== */