even more hummus

Co-authored-by: Tymon <nomyTx@users.noreply.github.com>
pull/1/head
Drake 2 years ago
parent 2b884b7642
commit 524120d542

973
dist/build.js vendored

File diff suppressed because one or more lines are too long

@ -28,6 +28,6 @@ export default defineConfig({
exclude: ["node_modules/**"],
transforms: ["jsx"],
}),
uglify(),
//uglify(),
],
});

@ -0,0 +1,13 @@
import { React, nests, nestsReact } from "../../common"
export default () => {
const extNest = demon.summon("internal/nest")
return (<div className="control-group demon-settings-card-header">
<label>Plugins</label>
{Object.keys(extNest.ghost.pluginsList).map((k) => {
return (<div>
{k}
</div>)
})}
</div>)
}

@ -12,10 +12,7 @@ const Switch = webpack.findByDisplayName("Switch")
export default (props) => {
nestsReact.useNest(props.nest)
if (!props.nest.ghost.pluginsList[props.name]) {
return null //you wouldn't think i'd have to do this but
}
if (!props.nest.ghost.pluginsStatus[props.name]) {
if (!props.nest.ghost.pluginsList[props.name] || !props.nest.ghost.pluginsStatus[props.name]) {
return null //you wouldn't think i'd have to do this but
}
return (<>

@ -1,7 +1,9 @@
import webpack from "../../webpack"
import { after } from "../../patcher"
import plugins from "./plugins.jsx"
import hummus from "./hummus.jsx"
import css from "../../css"
import { React } from "../../common"
const SettingsView = webpack.findByDisplayName("SettingsView")
@ -68,6 +70,26 @@ function init() {
})
return sections;
})
} else {
//I AM SO SORRY
const UserSettingsModal = webpack.findByProps("getUserSettingsModalSections");
const TabBar = webpack.findByProps("TabBarItem");
after("render", UserSettingsModal.default.prototype, (args, ret) => {
ret.props.children[0].props.children.props.children[1].push(React.createElement(TabBar.TabBarItem, { key: "demoncord" }, "Plugins"))
if (ret.props.children[0].props.children.props.selectedItem === "demoncord") {
/* ret.props.children[1].props.children[0].props.children.props.settings = {
"userId": ""
}
if (!!document.getElementsByClassName("account-warning")[0]) {
document.getElementsByClassName("account-warning")[0].remove()
}
const ele = document.querySelector(".^=user-settings-modal-")
ele.innerHTML = `<div>
<h1>Hello, world!</h1>
</div>` */
ret.props.children[1].props.children[0].props.children = React.createElement(hummus, {}, "")
}
})
}
}

Loading…
Cancel
Save