This commit is contained in:
Mirco Wittrien 2019-10-11 22:53:46 +02:00
parent 686dc05ad0
commit 767e8a179a
6 changed files with 64 additions and 23 deletions

File diff suppressed because one or more lines are too long

View File

@ -574,20 +574,20 @@ var BDFDB = {myPlugins: BDFDB && BDFDB.myPlugins ? BDFDB.myPlugins : {}, BDv2Api
}; };
BDFDB.appendItemLayer = function (node, anker, options = {}) { BDFDB.appendItemLayer = function (node, anker, options = {}) {
var itemlayerconainernative = document.querySelector(BDFDB.dotCN.itemlayerconainer); var itemlayercontainernative = document.querySelector(BDFDB.dotCN.itemlayercontainer);
if (!itemlayerconainernative || !Node.prototype.isPrototypeOf(node) || !anker || !Node.prototype.isPrototypeOf(anker) || !document.contains(anker)) return null; if (!itemlayercontainernative || !Node.prototype.isPrototypeOf(node) || !anker || !Node.prototype.isPrototypeOf(anker) || !document.contains(anker)) return null;
var itemlayerconainer = document.querySelector(".BDFDB-itemlayerconainer"); var itemlayercontainer = document.querySelector(".BDFDB-itemlayercontainer");
if (!itemlayerconainer) { if (!itemlayercontainer) {
itemlayerconainer = itemlayerconainernative.cloneNode(); itemlayercontainer = itemlayercontainernative.cloneNode();
BDFDB.addClass(itemlayerconainer, "BDFDB-itemlayerconainer"); BDFDB.addClass(itemlayercontainer, "BDFDB-itemlayercontainer");
itemlayerconainernative.parentElement.insertBefore(itemlayerconainer, itemlayerconainernative.nextSibling); itemlayercontainernative.parentElement.insertBefore(itemlayercontainer, itemlayercontainernative.nextSibling);
} }
var id = Math.round(Math.random() * 10000000000000000); var id = Math.round(Math.random() * 10000000000000000);
var itemlayer = BDFDB.htmlToElement(`<div class="${BDFDB.disCN.itemlayer} BDFDB-itemlayer itemlayer-${id}"></div>`); var itemlayer = BDFDB.htmlToElement(`<div class="${BDFDB.disCN.itemlayer} BDFDB-itemlayer itemlayer-${id}"></div>`);
itemlayer.appendChild(node); itemlayer.appendChild(node);
itemlayerconainer.appendChild(itemlayer); itemlayercontainer.appendChild(itemlayer);
if (options.css) BDFDB.appendLocalStyle('BDFDBcustomItemLayer' + id, options.css, itemlayerconainer); if (options.css) BDFDB.appendLocalStyle('BDFDBcustomItemLayer' + id, options.css, itemlayercontainer);
if (BDFDB.isObject(options.ankerlistener)) for (let type in options.ankerlistener) { if (BDFDB.isObject(options.ankerlistener)) for (let type in options.ankerlistener) {
if (typeof options.ankerlistener[type] == "function") anker.addEventListener(type, options.ankerlistener[type]); if (typeof options.ankerlistener[type] == "function") anker.addEventListener(type, options.ankerlistener[type]);
@ -603,8 +603,8 @@ var BDFDB = {myPlugins: BDFDB && BDFDB.myPlugins ? BDFDB.myPlugins : {}, BDv2Api
if (ownmatch || ankermatch || parentmatch) { if (ownmatch || ankermatch || parentmatch) {
observer.disconnect(); observer.disconnect();
itemlayer.remove(); itemlayer.remove();
BDFDB.removeLocalStyle('BDFDBcustomItemLayer' + id, itemlayerconainer); BDFDB.removeLocalStyle('BDFDBcustomItemLayer' + id, itemlayercontainer);
if (!itemlayerconainer.firstElementChild) BDFDB.removeEles(itemlayerconainer); if (!itemlayercontainer.firstElementChild) BDFDB.removeEles(itemlayercontainer);
if (BDFDB.isObject(options.ankerlistener)) for (let type in options.ankerlistener) anker.removeEventListener(type, options.ankerlistener[type]); if (BDFDB.isObject(options.ankerlistener)) for (let type in options.ankerlistener) anker.removeEventListener(type, options.ankerlistener[type]);
} }
}); });
@ -4717,7 +4717,7 @@ var BDFDB = {myPlugins: BDFDB && BDFDB.myPlugins ? BDFDB.myPlugins : {}, BDv2Api
imagewrapperinner: ['ImageWrapper', 'imageWrapperInner'], imagewrapperinner: ['ImageWrapper', 'imageWrapperInner'],
imagezoom: ['ImageWrapper', 'imageZoom'], imagezoom: ['ImageWrapper', 'imageZoom'],
itemlayer: ['ItemLayerContainer', 'layer'], itemlayer: ['ItemLayerContainer', 'layer'],
itemlayerconainer: ['ItemLayerContainer', 'layerContainer'], itemlayercontainer: ['ItemLayerContainer', 'layerContainer'],
input: ['Input', 'input'], input: ['Input', 'input'],
inputdefault: ['Input', 'inputDefault'], inputdefault: ['Input', 'inputDefault'],
inputdisabled: ['Input', 'disabled'], inputdisabled: ['Input', 'disabled'],
@ -5366,7 +5366,7 @@ var BDFDB = {myPlugins: BDFDB && BDFDB.myPlugins ? BDFDB.myPlugins : {}, BDv2Api
classname = DiscordClassModules[DiscordClasses[item][0]][DiscordClasses[item][1]]; classname = DiscordClassModules[DiscordClasses[item][0]][DiscordClasses[item][1]];
if (selector) { if (selector) {
classname = classname.split(' ').filter(n => n.indexOf('da-') != 0).join(selector ? '.' : ' '); classname = classname.split(' ').filter(n => n.indexOf('da-') != 0).join(selector ? '.' : ' ');
classname = classname ? classname : DiscordClassModules.BDFDB.BDFDBundefined; classname = classname || DiscordClassModules.BDFDB.BDFDBundefined;
} }
return classname; return classname;
} }
@ -5683,7 +5683,7 @@ var BDFDB = {myPlugins: BDFDB && BDFDB.myPlugins ? BDFDB.myPlugins : {}, BDv2Api
#pluginNotice #outdatedPlugins span:hover { #pluginNotice #outdatedPlugins span:hover {
text-decoration: underline; text-decoration: underline;
} }
.BDFDB-itemlayerconainer, .BDFDB-itemlayer { .BDFDB-itemlayercontainer, .BDFDB-itemlayer {
z-index: 3002; z-index: 3002;
} }
${BDFDB.dotCN.tooltip}.tooltip-customcolor ${BDFDB.dotCN.tooltippointer} { ${BDFDB.dotCN.tooltip}.tooltip-customcolor ${BDFDB.dotCN.tooltippointer} {
@ -6555,7 +6555,7 @@ var BDFDB = {myPlugins: BDFDB && BDFDB.myPlugins ? BDFDB.myPlugins : {}, BDv2Api
BDFDB.addContextListener(BDFDB); BDFDB.addContextListener(BDFDB);
BDFDB.addObserver(BDFDB, document.querySelector(BDFDB.dotCN.itemlayerconainer), {name:"layerObserverBDFDB", instance: BDFDB.addObserver(BDFDB, document.querySelector(BDFDB.dotCN.itemlayercontainer), {name:"layerObserverBDFDB", instance:
new MutationObserver(changes => {changes.forEach(change => {change.addedNodes.forEach(node => { new MutationObserver(changes => {changes.forEach(change => {change.addedNodes.forEach(node => {
if (node.tagName && (BDFDB.containsClass(node, BDFDB.disCN.contextmenu) || (node = node.querySelector(BDFDB.dotCN.contextmenu)) != null)) BDFDB.initElements(node); if (node.tagName && (BDFDB.containsClass(node, BDFDB.disCN.contextmenu) || (node = node.querySelector(BDFDB.dotCN.contextmenu)) != null)) BDFDB.initElements(node);
})})}) })})})

View File

@ -3,7 +3,7 @@
class EditServers { class EditServers {
getName () {return "EditServers";} getName () {return "EditServers";}
getVersion () {return "2.0.6";} getVersion () {return "2.0.7";}
getAuthor () {return "DevilBro";} getAuthor () {return "DevilBro";}
@ -403,7 +403,7 @@ class EditServers {
}); });
urlinput.addEventListener("mouseleave", () => { urlinput.addEventListener("mouseleave", () => {
BDFDB.removeClass(urlinput, "hovering"); BDFDB.removeClass(urlinput, "hovering");
BDFDB.removeEles(BDFDB.dotCNS.itemlayerconainer + ".notice-tooltip"); BDFDB.removeEles(BDFDB.dotCNS.itemlayercontainer + ".notice-tooltip");
}); });
} }
if (info.id == "410787888507256842") { if (info.id == "410787888507256842") {
@ -446,7 +446,7 @@ class EditServers {
} }
checkUrl (input) { checkUrl (input) {
BDFDB.removeEles(BDFDB.dotCNS.itemlayerconainer + ".notice-tooltip"); BDFDB.removeEles(BDFDB.dotCNS.itemlayercontainer + ".notice-tooltip");
if (!input.value) { if (!input.value) {
BDFDB.removeClass(input, "valid"); BDFDB.removeClass(input, "valid");
BDFDB.removeClass(input, "invalid"); BDFDB.removeClass(input, "invalid");

View File

@ -3,7 +3,7 @@
class EditUsers { class EditUsers {
getName () {return "EditUsers";} getName () {return "EditUsers";}
getVersion () {return "3.6.1";} getVersion () {return "3.6.2";}
getAuthor () {return "DevilBro";} getAuthor () {return "DevilBro";}
@ -396,7 +396,7 @@ class EditUsers {
}); });
userurlinput.addEventListener("mouseleave", () => { userurlinput.addEventListener("mouseleave", () => {
BDFDB.removeClass(userurlinput, "hovering"); BDFDB.removeClass(userurlinput, "hovering");
BDFDB.removeEles(BDFDB.dotCNS.itemlayerconainer + ".notice-tooltip"); BDFDB.removeEles(BDFDB.dotCNS.itemlayercontainer + ".notice-tooltip");
}); });
BDFDB.addChildEventListener(userSettingsModal, "click", ".btn-save", e => { BDFDB.addChildEventListener(userSettingsModal, "click", ".btn-save", e => {
name = usernameinput.value.trim(); name = usernameinput.value.trim();
@ -430,7 +430,7 @@ class EditUsers {
} }
checkUrl (input) { checkUrl (input) {
BDFDB.removeEles(BDFDB.dotCNS.itemlayerconainer + ".notice-tooltip"); BDFDB.removeEles(BDFDB.dotCNS.itemlayercontainer + ".notice-tooltip");
if (!input.value) { if (!input.value) {
BDFDB.removeClass(input, "valid"); BDFDB.removeClass(input, "valid");
BDFDB.removeClass(input, "invalid"); BDFDB.removeClass(input, "invalid");

View File

@ -13,7 +13,7 @@
<div class="preview-titlebar"></div> <div class="preview-titlebar"></div>
<div class="REPLACE_CLASS_app"> <div class="REPLACE_CLASS_app">
<div class="REPLACE_CLASS_appold REPLACE_CLASS_vertical REPLACE_CLASS_themelight"> <div class="REPLACE_CLASS_appold REPLACE_CLASS_vertical REPLACE_CLASS_themelight">
<div class="REPLACE_CLASS_layersbg"> <div class="REPLACE_CLASS_layersbg"></div>
<div class="REPLACE_CLASS_layers REPLACE_CLASS_applayers"> <div class="REPLACE_CLASS_layers REPLACE_CLASS_applayers">
<div role="dialog" aria-hidden="false" class="REPLACE_CLASS_layer REPLACE_CLASS_layerbase"> <div role="dialog" aria-hidden="false" class="REPLACE_CLASS_layer REPLACE_CLASS_layerbase">
<div class="REPLACE_CLASS_appcontainer"> <div class="REPLACE_CLASS_appcontainer">

View File

@ -0,0 +1,41 @@
body,
#app-mount,
#app-mount REPLACE_CLASS_app,
#app-mount REPLACE_CLASS_appold,
#app-mount REPLACE_CLASS_layersbg,
#app-mount REPLACE_CLASS_layer,
#app-mount REPLACE_CLASS_guildchannels,
#app-mount REPLACE_CLASS_dmchannels,
#app-mount REPLACE_CLASS_channelpanels > *,
#app-mount REPLACE_CLASS_chat,
#app-mount REPLACE_CLASS_nochannel,
#app-mount REPLACE_CLASS_activityfeed,
#app-mount REPLACE_CLASS_gamelibrary,
#app-mount REPLACE_CLASS_gamelibrarytableheader,
#app-mount REPLACE_CLASS_giftinventory,
#app-mount REPLACE_CLASS_applicationstore,
#app-mount REPLACE_CLASS_lfg,
#app-mount REPLACE_CLASS_friends,
#app-mount REPLACE_CLASS_guilddiscovery,
#app-mount REPLACE_CLASS_scroller,
#app-mount REPLACE_CLASS_standardsidebarview,
#app-mount REPLACE_CLASS_contentregion {
background-color: transparent;
}
#app-mount REPLACE_CLASS_channelheaderchildren:after {
display: none;
}
#app-mount REPLACE_CLASS_guildswrapper {
background-color: rgba(0, 0, 0, 0.3);
}
#app-mount REPLACE_CLASS_channelheaderheaderbarREPLACE_CLASS_channelheaderheaderbarthemed,
#app-mount REPLACE_CLASS_sidebarregion,
#app-mount REPLACE_CLASS_channels {
background-color: rgba(0, 0, 0, 0.2);
}
#app-mount REPLACE_CLASS_channelpanels {
background-color: rgba(0, 0, 0, 0.2);
}
#app-mount REPLACE_CLASS_memberswrap {
background-color: rgba(0, 0, 0, 0.2);
}