diff --git a/BetterDiscordApp/src/modules/devMode.js b/BetterDiscordApp/src/modules/devMode.js index db8a4c9..1118d63 100644 --- a/BetterDiscordApp/src/modules/devMode.js +++ b/BetterDiscordApp/src/modules/devMode.js @@ -1,6 +1,7 @@ import {settingsCookie} from "../0globals"; import BDV2 from "./v2"; import DOM from "./domtools"; +import Utils from "./utils"; export default new class DevMode { constructor() { @@ -51,24 +52,36 @@ export default new class DevMode { const selector = this.getSelector(e.target); let [ - classNameLayer, + classLayer, classItems ] = [ - BDModules.get((e) => e.layer && typeof e.layer === "string" && e.disabledPointerEvents)[0].layer, - BDModules.get((e) => e.contextMenu)[0], + BDModules.get((e) => e.layer && typeof e.layer === "string" && e.disabledPointerEvents)[0], + BDModules.get((e) => e.menu)[0] ] function attach() { - let cm = DOM.query("."+classItems.contextMenu.split(" ")[0]); + if(!classItems || !classLayer.layer)return console.log(classItems, classLayer.layer) + + let cm = DOM.query("."+Utils.removeDa(classItems.menu)); if (!cm) { - const container = DOM.query("#app-mount"); - const cmWrap = DOM.createElement(`