MediaWiki:Common.js: Difference between revisions

From Zezenia Online Wiki
Created page with "→‎Any JavaScript here will be loaded for all users on every page load.: var css = document.createElement("link"); css.rel = "stylesheet"; css.type = "text/css"; css.href =..."
 
No edit summary
Line 7: Line 7:


var script = document.createElement("script");
var script = document.createElement("script");
script.src = "https://www.playzezenia.com/cdn/js/cookieconsent.js";
script.src = "https://www.playzezenia.com/cdn/scripts/cookieconsent.js";
script.async = true;
script.async = true;
script.onload = function() {
script.onload = function() {

Revision as of 00:47, 9 February 2021

/* Any JavaScript here will be loaded for all users on every page load. */
var css = document.createElement("link");
css.rel = "stylesheet";
css.type = "text/css";
css.href = "https://www.playzezenia.com/cdn/styles/cookieconsent.css";
document.head.appendChild(css);

var script = document.createElement("script");
script.src = "https://www.playzezenia.com/cdn/scripts/cookieconsent.js";
script.async = true;
script.onload = function() {
window.cookieconsent.initialise({
	palette: {
		popup: {
			background: "#000",
			text: "#ececec"
		},
		button: {
			background: "#fff",
			text: "#000"
		}
	},
	content: {
		message: "Zezenia Online uses cookies to log you in and improve our services.",
		dismiss: "I agree",
		link: "Privacy Policy",
		href: "https://www.playzezenia.com/home/legal#2",
	},
	cookie: {
		domain: "." + document.domain.split('.').reverse().splice(0, 2).reverse().join('.'),
	},
});
}
document.body.appendChild(script);