stuff
This commit is contained in:
parent
7c2ef84292
commit
0033dbf5c4
|
@ -5948,30 +5948,30 @@
|
|||
BDFDB.DiscordClasses = Object.assign({}, DiscordClasses);
|
||||
|
||||
InternalBDFDB.getDiscordClass = (item, selector) => {
|
||||
var classname = DiscordClassModules.BDFDB.BDFDBundefined;
|
||||
let className = DiscordClassModules.BDFDB.BDFDBundefined;
|
||||
if (DiscordClasses[item] === undefined) {
|
||||
BDFDB.LogUtils.warn(item + " not found in DiscordClasses");
|
||||
return classname;
|
||||
return className;
|
||||
}
|
||||
else if (!BDFDB.ArrayUtils.is(DiscordClasses[item]) || DiscordClasses[item].length != 2) {
|
||||
BDFDB.LogUtils.warn(item + " is not an Array of Length 2 in DiscordClasses");
|
||||
return classname;
|
||||
return className;
|
||||
}
|
||||
else if (DiscordClassModules[DiscordClasses[item][0]] === undefined) {
|
||||
BDFDB.LogUtils.warn(DiscordClasses[item][0] + " not found in DiscordClassModules");
|
||||
return classname;
|
||||
return className;
|
||||
}
|
||||
else if (DiscordClassModules[DiscordClasses[item][0]][DiscordClasses[item][1]] === undefined) {
|
||||
BDFDB.LogUtils.warn(DiscordClasses[item][1] + " not found in " + DiscordClasses[item][0] + " in DiscordClassModules");
|
||||
return classname;
|
||||
return className;
|
||||
}
|
||||
else {
|
||||
classname = DiscordClassModules[DiscordClasses[item][0]][DiscordClasses[item][1]];
|
||||
className = DiscordClassModules[DiscordClasses[item][0]][DiscordClasses[item][1]];
|
||||
if (selector) {
|
||||
classname = classname.split(" ").filter(n => n.indexOf("da-") != 0).join(selector ? "." : " ");
|
||||
classname = classname || DiscordClassModules.BDFDB.BDFDBundefined;
|
||||
className = className.split(" ").filter(n => n.indexOf("da-") != 0).join(selector ? "." : " ");
|
||||
className = className || DiscordClassModules.BDFDB.BDFDBundefined;
|
||||
}
|
||||
return classname;
|
||||
return className;
|
||||
}
|
||||
};
|
||||
BDFDB.disCN = new Proxy(DiscordClasses, {
|
||||
|
@ -5991,20 +5991,20 @@
|
|||
});
|
||||
BDFDB.dotCN = new Proxy(DiscordClasses, {
|
||||
get: function (list, item) {
|
||||
let classname = InternalBDFDB.getDiscordClass(item, true);
|
||||
return (classname.indexOf("#") == 0 ? "" : ".") + classname;
|
||||
let className = InternalBDFDB.getDiscordClass(item, true);
|
||||
return (className.indexOf("#") == 0 ? "" : ".") + className;
|
||||
}
|
||||
});
|
||||
BDFDB.dotCNS = new Proxy(DiscordClasses, {
|
||||
get: function (list, item) {
|
||||
let classname = InternalBDFDB.getDiscordClass(item, true);
|
||||
return (classname.indexOf("#") == 0 ? "" : ".") + classname + " ";
|
||||
let className = InternalBDFDB.getDiscordClass(item, true);
|
||||
return (className.indexOf("#") == 0 ? "" : ".") + className + " ";
|
||||
}
|
||||
});
|
||||
BDFDB.dotCNC = new Proxy(DiscordClasses, {
|
||||
get: function (list, item) {
|
||||
let classname = InternalBDFDB.getDiscordClass(item, true);
|
||||
return (classname.indexOf("#") == 0 ? "" : ".") + classname + ",";
|
||||
let className = InternalBDFDB.getDiscordClass(item, true);
|
||||
return (className.indexOf("#") == 0 ? "" : ".") + className + ",";
|
||||
}
|
||||
});
|
||||
BDFDB.notCN = new Proxy(DiscordClasses, {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -122,20 +122,61 @@
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
let disCN = new Proxy({}, {
|
||||
let disCN = new Proxy(DiscordClasses, {
|
||||
get: function (list, item) {
|
||||
return getDiscordClass(item).replace('#', '');
|
||||
return getDiscordClass(item, false).replace("#", "");
|
||||
}
|
||||
});
|
||||
let getDiscordClass = function (item) {
|
||||
let disCNS = new Proxy(DiscordClasses, {
|
||||
get: function (list, item) {
|
||||
return getDiscordClass(item, false).replace("#", "") + " ";
|
||||
}
|
||||
});
|
||||
let disCNC = new Proxy(DiscordClasses, {
|
||||
get: function (list, item) {
|
||||
return getDiscordClass(item, false).replace("#", "") + ",";
|
||||
}
|
||||
});
|
||||
let dotCN = new Proxy(DiscordClasses, {
|
||||
get: function (list, item) {
|
||||
let className = getDiscordClass(item, true);
|
||||
return (className.indexOf("#") == 0 ? "" : ".") + className;
|
||||
}
|
||||
});
|
||||
let dotCNS = new Proxy(DiscordClasses, {
|
||||
get: function (list, item) {
|
||||
let className = getDiscordClass(item, true);
|
||||
return (className.indexOf("#") == 0 ? "" : ".") + className + " ";
|
||||
}
|
||||
});
|
||||
let dotCNC = new Proxy(DiscordClasses, {
|
||||
get: function (list, item) {
|
||||
let className = getDiscordClass(item, true);
|
||||
return (className.indexOf("#") == 0 ? "" : ".") + className + ",";
|
||||
}
|
||||
});
|
||||
let notCN = new Proxy(DiscordClasses, {
|
||||
get: function (list, item) {
|
||||
return `:not(.${getDiscordClass(item, true).split(".")[0]})`;
|
||||
}
|
||||
});
|
||||
let notCNS = new Proxy(DiscordClasses, {
|
||||
get: function (list, item) {
|
||||
return `:not(.${getDiscordClass(item, true).split(".")[0]}) `;
|
||||
}
|
||||
});
|
||||
let notCNC = new Proxy(DiscordClasses, {
|
||||
get: function (list, item) {
|
||||
return `:not(.${getDiscordClass(item, true).split(".")[0]}),`;
|
||||
}
|
||||
});
|
||||
let getDiscordClass = function (item, selector) {
|
||||
let className = "Preview_undefined";
|
||||
if (DiscordClasses === undefined || DiscordClassModules === undefined) return className;
|
||||
else if (DiscordClasses[item] === undefined) {
|
||||
if (DiscordClasses[item] === undefined) {
|
||||
if (userId == "278543574059057154") console.warn(`%c[Preview]%c`, 'color:#3a71c1; font-weight:700;', '', item + ' not found in DiscordClasses');
|
||||
return className;
|
||||
}
|
||||
else if (!Array.isArray(DiscordClasses[item]) || DiscordClasses[item].length != 2) {
|
||||
else if (!BDFDB.ArrayUtils.is(DiscordClasses[item]) || DiscordClasses[item].length != 2) {
|
||||
if (userId == "278543574059057154") console.warn(`%c[Preview]%c`, 'color:#3a71c1; font-weight:700;', '', item + ' is not an Array of Length 2 in DiscordClasses');
|
||||
return className;
|
||||
}
|
||||
|
@ -147,7 +188,14 @@
|
|||
if (userId == "278543574059057154") console.warn(`%c[Preview]%c`, 'color:#3a71c1; font-weight:700;', '', DiscordClasses[item][1] + ' not found in ' + DiscordClasses[item][0] + ' in DiscordClassModules');
|
||||
return className;
|
||||
}
|
||||
else return className = DiscordClassModules[DiscordClasses[item][0]][DiscordClasses[item][1]];
|
||||
else {
|
||||
className = DiscordClassModules[DiscordClasses[item][0]][DiscordClasses[item][1]];
|
||||
if (selector) {
|
||||
className = className.split(" ").filter(n => n.indexOf("da-") != 0).join(selector ? "." : " ");
|
||||
className = className || "Preview_undefined";
|
||||
}
|
||||
return className;
|
||||
}
|
||||
};
|
||||
|
||||
if (typeof window.require != "function") window.require = function () {
|
||||
|
|
Loading…
Reference in New Issue