Update GameActivityToggle.plugin.js
This commit is contained in:
parent
2e2046649e
commit
3235508792
|
@ -2,7 +2,7 @@
|
||||||
* @name GameActivityToggle
|
* @name GameActivityToggle
|
||||||
* @author DevilBro
|
* @author DevilBro
|
||||||
* @authorId 278543574059057154
|
* @authorId 278543574059057154
|
||||||
* @version 1.2.2
|
* @version 1.2.3
|
||||||
* @description Adds a Quick-Toggle Game Activity Button
|
* @description Adds a Quick-Toggle Game Activity Button
|
||||||
* @invite Jx3TjNS
|
* @invite Jx3TjNS
|
||||||
* @donate https://www.paypal.me/MircoWittrien
|
* @donate https://www.paypal.me/MircoWittrien
|
||||||
|
@ -235,9 +235,10 @@ module.exports = (_ => {
|
||||||
|
|
||||||
processAccount (e) {
|
processAccount (e) {
|
||||||
if (!this.settings.general.showButton) return;
|
if (!this.settings.general.showButton) return;
|
||||||
let children = BDFDB.ObjectUtils.get(e.returnvalue, "props.children.1.props.children");
|
let accountinfo = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.accountinfo]]});
|
||||||
|
let children = accountinfo && BDFDB.ObjectUtils.get(accountinfo, "props.children.1.props.children");
|
||||||
if (children && children.length && BDFDB.ArrayUtils.is(children)) {
|
if (children && children.length && BDFDB.ArrayUtils.is(children)) {
|
||||||
e.returnvalue.props.className = BDFDB.DOMUtils.formatClassName(e.returnvalue.props.className, BDFDB.disCN._gameactivitytoggleadded);
|
accountinfo.props.className = BDFDB.DOMUtils.formatClassName(accountinfo.props.className, BDFDB.disCN._gameactivitytoggleadded);
|
||||||
children.unshift(BDFDB.ReactUtils.createElement(ActivityToggleComponent, {}));
|
children.unshift(BDFDB.ReactUtils.createElement(ActivityToggleComponent, {}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue