This commit is contained in:
Mirco Wittrien 2023-10-27 13:35:13 +02:00
parent 620583b75c
commit 91f953ca2e
3 changed files with 32 additions and 39 deletions

View File

@ -3744,9 +3744,9 @@ module.exports = (_ => {
};
BDFDB.DOMUtils.appendWebScript = function (url, container) {
if (typeof url != "string") return;
if (!container && !document.head.querySelector("bd-head bd-scripts")) document.head.appendChild(BDFDB.DOMUtils.create(`<bd-head><bd-scripts></bd-scripts></bd-head>`));
container = container || document.head.querySelector("bd-head bd-scripts") || document.head;
container = Node.prototype.isPrototypeOf(container) ? container : document.head;
if (!container && !document.body.querySelector("bd-head bd-scripts")) document.body.appendChild(BDFDB.DOMUtils.create(`<bd-head><bd-scripts></bd-scripts></bd-head>`));
container = container || document.body.querySelector("bd-head bd-scripts") || document.body;
container = Node.prototype.isPrototypeOf(container) ? container : document.body;
BDFDB.DOMUtils.removeWebScript(url, container);
let script = document.createElement("script");
script.src = url;
@ -3754,36 +3754,36 @@ module.exports = (_ => {
};
BDFDB.DOMUtils.removeWebScript = function (url, container) {
if (typeof url != "string") return;
container = container || document.head.querySelector("bd-head bd-scripts") || document.head;
container = Node.prototype.isPrototypeOf(container) ? container : document.head;
container = container || document.body.querySelector("bd-head bd-scripts") || document.body;
container = Node.prototype.isPrototypeOf(container) ? container : document.body;
BDFDB.DOMUtils.remove(container.querySelectorAll(`script[src="${url}"]`));
};
BDFDB.DOMUtils.appendWebStyle = function (url, container) {
if (typeof url != "string") return;
if (!container && !document.head.querySelector("bd-head bd-styles")) document.head.appendChild(BDFDB.DOMUtils.create(`<bd-head><bd-styles></bd-styles></bd-head>`));
container = container || document.head.querySelector("bd-head bd-styles") || document.head;
container = Node.prototype.isPrototypeOf(container) ? container : document.head;
if (!container && !document.body.querySelector("bd-head bd-styles")) document.body.appendChild(BDFDB.DOMUtils.create(`<bd-head><bd-styles></bd-styles></bd-head>`));
container = container || document.body.querySelector("bd-head bd-styles") || document.body;
container = Node.prototype.isPrototypeOf(container) ? container : document.body;
BDFDB.DOMUtils.removeWebStyle(url, container);
container.appendChild(BDFDB.DOMUtils.create(`<link type="text/css" rel="stylesheet" href="${url}"></link>`));
};
BDFDB.DOMUtils.removeWebStyle = function (url, container) {
if (typeof url != "string") return;
container = container || document.head.querySelector("bd-head bd-styles") || document.head;
container = Node.prototype.isPrototypeOf(container) ? container : document.head;
container = container || document.body.querySelector("bd-head bd-styles") || document.body;
container = Node.prototype.isPrototypeOf(container) ? container : document.body;
BDFDB.DOMUtils.remove(container.querySelectorAll(`link[href="${url}"]`));
};
BDFDB.DOMUtils.appendLocalStyle = function (id, css, container) {
if (typeof id != "string" || typeof css != "string") return;
if (!container && !document.head.querySelector("bd-head bd-styles")) document.head.appendChild(BDFDB.DOMUtils.create(`<bd-head><bd-styles></bd-styles></bd-head>`));
container = container || document.head.querySelector("bd-head bd-styles") || document.head;
container = Node.prototype.isPrototypeOf(container) ? container : document.head;
if (!container && !document.body.querySelector("bd-head bd-styles")) document.body.appendChild(BDFDB.DOMUtils.create(`<bd-head><bd-styles></bd-styles></bd-head>`));
container = container || document.body.querySelector("bd-head bd-styles") || document.body;
container = Node.prototype.isPrototypeOf(container) ? container : document.body;
BDFDB.DOMUtils.removeLocalStyle(id, container);
container.appendChild(BDFDB.DOMUtils.create(`<style id="${id}CSS">${css.replace(/\t|\r|\n/g,"")}</style>`));
};
BDFDB.DOMUtils.removeLocalStyle = function (id, container) {
if (typeof id != "string") return;
container = container || document.head.querySelector("bd-head bd-styles") || document.head;
container = Node.prototype.isPrototypeOf(container) ? container : document.head;
container = container || document.body.querySelector("bd-head bd-styles") || document.body;
container = Node.prototype.isPrototypeOf(container) ? container : document.body;
BDFDB.DOMUtils.remove(container.querySelectorAll(`style[id="${id}CSS"]`));
};

View File

@ -3109,23 +3109,16 @@ img[src="/assets/cef02719c12d8aaf38894c16dca7fbe6.svg"] { /* rolesettings addr
color: var(--header-secondary);
}
#app-mount .inviteSettingsInviteRow-1rZeIM { /* invitesettings invitecard */
#app-mount .inviteSettingsInviteRow__0d747 { /* invitesettings invitecard */
box-shadow: 0 1px 0 0 var(--background-modifier-accent);
}
#app-mount .bannedUser-1IalTM { /* bansettings bancard */
#app-mount .bannedUser__38b44 { /* bansettings bancard */
background-color: transparent;
box-shadow: 0 1px 0 0 var(--background-modifier-accent);
}
#app-mount .bannedUser-1IalTM .username-1b3MVI { /* invitesettings username */
color: var(--header-primary);
}
#app-mount .bannedUserModal-3RJCOV .reasonHeader-2etdjy { /* invitesettings banmodalreasonheader */
color: var(--text-normal);
}
#app-mount .bannedUser-1IalTM .username-1b3MVI .discrim-oGb-FO,
#app-mount .bannedUserModal-3RJCOV .reason-YbfGC6, /* invitesettings banmodalreason */
#app-mount .bannedUserModal-3RJCOV .userDiscrim-1D2NlF { /* invitesettings discriminator */
color: var(--text-muted);
#app-mount .bannedUser__38b44:hover {
background-color: rgba(var(--transparencycolor), .3);
}
@ -3224,7 +3217,7 @@ img[src="/assets/cef02719c12d8aaf38894c16dca7fbe6.svg"] { /* rolesettings addr
flex: 1 0 auto;
}
#app-mount .separator-2lLxgC {
box-shadow: 0 1px 0 0 rgba(var(--transparencycolor),.3), 0 1px 2px 0 rgba(var(--transparencycolor),.3);
box-shadow: 0 1px 0 0 rgba(var(--transparencycolor), .3), 0 1px 2px 0 rgba(var(--transparencycolor), .3);
}
#app-mount .modalTextContainer_ddfc28 { /* modal text file */
background-color: rgba(var(--transparencycolor), .5);
@ -3241,9 +3234,6 @@ img[src="/assets/cef02719c12d8aaf38894c16dca7fbe6.svg"] { /* rolesettings addr
#app-mount .footer-3Zgy_M { /* modal footer info */
background-color: rgba(var(--transparencycolor), .3);
}
#app-mount .close-1mLglB { /* modal closebutton */
z-index: 2;
}
.tabBarContainer-sCZC4w { /* modal tabbarcontainer */
border-top-color: rgba(var(--transparencycolor), .3);
@ -6614,7 +6604,10 @@ html .bd-toast.toast-warn.icon::before {
}
.bd-addon-views .bd-view-button:hover {
background-color: rgba(var(--transparencycolor), .3);
background: rgba(var(--transparencycolor), .3);
}
.bd-addon-views .bd-view-button:active {
background: rgba(var(--accentcolor), .7);
}
.bd-button {

View File

@ -2698,7 +2698,7 @@ img[src='/assets/58957d928db6fb9d4658eb882f33d7bc.svg'] {
background: var(--header-primary);
}
#app-mount .inviteSettingsInviteRow-1rZeIM {
#app-mount .inviteSettingsInviteRow__0d747 {
box-shadow: 0 1px 0 0 rgba(var(--textbrightest),.04);
}
#app-mount .row-1oTw_K {
@ -2708,18 +2708,18 @@ img[src='/assets/58957d928db6fb9d4658eb882f33d7bc.svg'] {
background-color: rgba(var(--textbrightest),.04);
}
#app-mount .bannedUser-1IalTM {
#app-mount .bannedUser__38b44 {
box-shadow: 0 1px 0 0 rgba(var(--textbrightest),.04);
}
#app-mount .bannedUser-1IalTM .username-1b3MVI {
#app-mount .bannedUser__38b44 .username-1b3MVI {
color: var(--header-primary);
}
#app-mount .bannedUser-1IalTM .username-1b3MVI .discrim-oGb-FO,
#app-mount .bannedUserModal-3RJCOV .reason-YbfGC6,
#app-mount .bannedUserModal-3RJCOV .userDiscrim-1D2NlF {
#app-mount .bannedUser__38b44 .username-1b3MVI .discrim-oGb-FO,
#app-mount .bannedUserModal_f9f9e4 .reason-YbfGC6,
#app-mount .bannedUserModal_f9f9e4 .userDiscrim-1D2NlF {
color: var(--text-muted);
}
#app-mount .bannedUserModal-3RJCOV .reasonHeader-2etdjy {
#app-mount .bannedUserModal_f9f9e4 .reasonHeader__5e7c3 {
color: var(--text-normal);
}