Update OldTitleBar.plugin.js
This commit is contained in:
parent
0326de7dc0
commit
7542eb5faf
|
@ -3,7 +3,7 @@
|
|||
class OldTitleBar {
|
||||
getName () {return "OldTitleBar";}
|
||||
|
||||
getVersion () {return "1.6.2";}
|
||||
getVersion () {return "1.6.3";}
|
||||
|
||||
getAuthor () {return "DevilBro";}
|
||||
|
||||
|
@ -17,6 +17,7 @@ class OldTitleBar {
|
|||
this.patchedModules = {
|
||||
after: {
|
||||
App: "render",
|
||||
AppSkeleton: "render",
|
||||
HeaderBarContainer: "render",
|
||||
StandardSidebarView: "render",
|
||||
AuthWrapper: "render"
|
||||
|
@ -28,6 +29,7 @@ class OldTitleBar {
|
|||
this.patched = false;
|
||||
|
||||
this.css = `
|
||||
.OTB-enabled ${BDFDB.dotCN.titlebar},
|
||||
.OTB-enabled ${BDFDB.dotCN.splashbackground}:before {
|
||||
display: none !important;
|
||||
}
|
||||
|
@ -160,6 +162,8 @@ class OldTitleBar {
|
|||
|
||||
BDFDB.ModuleUtils.forceAllUpdates(this);
|
||||
|
||||
BDFDB.ReactUtils.forceUpdate(BDFDB.ReactUtils.findOwner(document.querySelector(BDFDB.dotCN.app), {name:"App"}));
|
||||
|
||||
BDFDB.DOMUtils.removeClassFromDOM("OTB-enabled");
|
||||
|
||||
BDFDB.PluginUtils.clear(this);
|
||||
|
@ -177,10 +181,18 @@ class OldTitleBar {
|
|||
}
|
||||
|
||||
processApp (e) {
|
||||
let [children, index] = BDFDB.ReactUtils.findChildren(e.returnvalue, {props:[["type",["WINDOWS", "MACOS"]]]});
|
||||
let [children, index] = BDFDB.ReactUtils.findChildren(e.instance, {props:[["type",["WINDOWS", "MACOS"]]]});
|
||||
if (index > -1) children[index] = null;
|
||||
}
|
||||
|
||||
processAppSkeleton (e) {
|
||||
let [children, index] = BDFDB.ReactUtils.findChildren(e.returnvalue, {props:[["type",["WINDOWS", "MACOS"]]]});
|
||||
if (index > -1) {
|
||||
children[index] = null;
|
||||
BDFDB.ReactUtils.forceUpdate(e.instance);
|
||||
}
|
||||
}
|
||||
|
||||
processHeaderBarContainer (e) {
|
||||
if (!BDFDB.DataUtils.get(this, "settings", "addOldBar")) return;
|
||||
let children = BDFDB.ReactUtils.getValue(e.returnvalue, "props.toolbar.props.children");
|
||||
|
|
Loading…
Reference in New Issue