CSS separation, multi-tenancy fixes
This commit is contained in:
@ -28,21 +28,19 @@ window.interop = {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
addCSS: function (id, url) {
|
||||
if (document.getElementById(id) === null) {
|
||||
var link = document.createElement("link");
|
||||
includeCSS: function (id, url) {
|
||||
var link = document.getElementById('yourid');
|
||||
if (link === null) {
|
||||
link = document.createElement("link");
|
||||
link.id = id;
|
||||
link.type = "text/css";
|
||||
link.rel = "stylesheet";
|
||||
link.href = url;
|
||||
document.head.appendChild(link);
|
||||
}
|
||||
},
|
||||
removeCSS: function (pattern) {
|
||||
var links = document.getElementsByTagName("link");
|
||||
for (var i = 0; i < links.length; i++) {
|
||||
if (links[i].id.includes(pattern)) {
|
||||
document.head.removeChild(links[i]);
|
||||
else {
|
||||
if (link.href !== url) {
|
||||
link.setAttribute('href', url);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1,20 +1,3 @@
|
||||
/* called by index.html to check if mode is set */
|
||||
function getCookie(name) {
|
||||
name = name + "=";
|
||||
var decodedCookie = decodeURIComponent(document.cookie);
|
||||
var ca = decodedCookie.split(';');
|
||||
for (var i = 0; i < ca.length; i++) {
|
||||
var c = ca[i];
|
||||
while (c.charAt(0) === ' ') {
|
||||
c = c.substring(1);
|
||||
}
|
||||
if (c.indexOf(name) === 0) {
|
||||
return c.substring(name.length, c.length);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/* Open when someone clicks on the span element */
|
||||
function openActions() {
|
||||
document.getElementById("actions").style.width = "25%";
|
||||
|
Reference in New Issue
Block a user