From a57a8e51a15f24004cfd8c259e5966bf5f17370c Mon Sep 17 00:00:00 2001 From: Caleb James DeLisle Date: Wed, 18 Jul 2018 13:20:16 +0200 Subject: [PATCH] Prevent alertify.js from overriding styles --- www/common/common-interface.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/www/common/common-interface.js b/www/common/common-interface.js index 7b05d22fe..75db27ea3 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -1,3 +1,11 @@ +if (!document.querySelector("#alertifyCSS")) { + // Prevent alertify from injecting CSS, we create our own in alertify.less. + var head = document.getElementsByTagName("head")[0]; + var css = document.createElement("span"); + css.id = "alertifyCSS"; + css.setAttribute('data-but-why', 'see: common-interface.js'); + head.insertBefore(css, head.firstChild); +} define([ 'jquery', '/customize/messages.js',