Fixes button hiding settings
This commit is contained in:
parent
f062b153d7
commit
aef148722b
|
@ -11,7 +11,7 @@ branches:
|
|||
- development
|
||||
|
||||
install:
|
||||
- npm install
|
||||
- npm ci
|
||||
|
||||
script:
|
||||
- npm run deploy
|
||||
|
|
30
README.md
30
README.md
|
@ -112,7 +112,7 @@ These people have all subscribed to the `True Supporter` tier on Patreon to supp
|
|||
<a href="https://github.com/Gibbu" target="_blank" rel="noreferrer noopener"><strong>Gibbu</strong></a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/25717114/c100599e58174499b44b4307c26f9312/1.jpeg" width="100px;" alt="Orekieh"/><br />
|
||||
<img src="https://i.imgur.com/ImS2OCB.png" width="100px;" alt="Orekieh"/><br />
|
||||
<strong>Orekieh</strong>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -125,18 +125,26 @@ These people have all subscribed to the `Bandager` tier on Patreon to support me
|
|||
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<img src="https://cdn.discordapp.com/avatars/332199319169925120/4709f8f0c9cb7ababd85459bf71848b9.png" width="50px;" alt="William JCM"/><br />
|
||||
<a href="https://github.com/williamjcm" target="_blank" rel="noreferrer noopener"><strong>William JCM</strong></a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<img src="https://avatars0.githubusercontent.com/u/24623601" width="50px;" alt="NFLD99"/><br />
|
||||
<a href="https://github.com/NFLD99" target="_blank" rel="noreferrer noopener"><strong>NFLD99</strong></a>
|
||||
</td>
|
||||
<img src="https://cdn.discordapp.com/avatars/332199319169925120/4709f8f0c9cb7ababd85459bf71848b9.png" width="50px;" alt="William JCM"/><br />
|
||||
<a href="https://github.com/williamjcm" target="_blank" rel="noreferrer noopener"><strong>William JCM</strong></a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<img src="https://i.postimg.cc/5NVxqMnb/Cute-Squid-Circle.png" width="50px;" alt="Tenuit"/><br />
|
||||
<strong>Tenuit</strong>
|
||||
</td>
|
||||
<img src="https://avatars0.githubusercontent.com/u/24623601" width="50px;" alt="NFLD99"/><br />
|
||||
<a href="https://github.com/NFLD99" target="_blank" rel="noreferrer noopener"><strong>NFLD99</strong></a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<img src="https://i.postimg.cc/5NVxqMnb/Cute-Squid-Circle.png" width="50px;" alt="Tenuit"/><br />
|
||||
<strong>Tenuit</strong>
|
||||
</td>
|
||||
<td align="center">
|
||||
<img src="https://avatars0.githubusercontent.com/u/16616715" width="50px;" alt="Pu"/><br />
|
||||
<a href="https://github.com/Puv1s" target="_blank" rel="noreferrer noopener"><strong>Pu</strong></a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<img src="https://cdn.discordapp.com/attachments/769608503496278036/769680733693804625/tacoindustries.jpg" width="50px;" alt="Paco"/><br />
|
||||
<strong>Paco</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -2,13 +2,13 @@ import Builtin from "../../structs/builtin";
|
|||
import WebpackModules from "../../modules/webpackmodules";
|
||||
import Utilities from "../../modules/utilities";
|
||||
|
||||
export default new class GifPickerHider extends Builtin {
|
||||
get name() {return "GifPickerHider";}
|
||||
export default new class HideGIFButton extends Builtin {
|
||||
get name() {return "HideGIFButton";}
|
||||
get category() {return "appearance";}
|
||||
get id() {return "gifPickerHider";}
|
||||
get id() {return "hideGIFButton";}
|
||||
|
||||
enabled() {
|
||||
this.unpatch = this.after(WebpackModules.find(m => m.type && m.type.render && m.type.render.displayName === "ChannelTextAreaContainer").type, "render", (_, __, returnValue) => {
|
||||
this.after(WebpackModules.find(m => m.type && m.type.render && m.type.render.displayName === "ChannelTextAreaContainer").type, "render", (_, __, returnValue) => {
|
||||
const buttons = Utilities.getNestedProp(returnValue, "props.children.props.children.props.children.1.props.children.props.children.2.props.children");
|
||||
if (Array.isArray(buttons)) {
|
||||
for (const button of buttons) {
|
||||
|
@ -16,8 +16,8 @@ export default new class GifPickerHider extends Builtin {
|
|||
const renderFunc = Utilities.getNestedProp(button, "type.type.render");
|
||||
if (!renderFunc) continue;
|
||||
|
||||
// "ChannelGIFPickerButton" for sticker button
|
||||
if (["ChannelStickerPickerButton"].includes(renderFunc.displayName)) {
|
||||
// ChannelStickerPickerButton for sticker button
|
||||
if (renderFunc.displayName === "ChannelGIFPickerButton") {
|
||||
button.props.disabled = true;
|
||||
break;
|
||||
}
|
||||
|
@ -27,6 +27,6 @@ export default new class GifPickerHider extends Builtin {
|
|||
}
|
||||
|
||||
disabled() {
|
||||
this.unpatch();
|
||||
this.unpatchAll();
|
||||
}
|
||||
};
|
|
@ -2,13 +2,13 @@ import Builtin from "../../structs/builtin";
|
|||
import WebpackModules from "../../modules/webpackmodules";
|
||||
import Utilities from "../../modules/utilities";
|
||||
|
||||
export default new class NitroGiftPickerHider extends Builtin {
|
||||
get name() {return "NitroGiftPickerHider";}
|
||||
export default new class HideGiftButton extends Builtin {
|
||||
get name() {return "HideGiftButton";}
|
||||
get category() {return "appearance";}
|
||||
get id() {return "nitroGiftPickerHider";}
|
||||
get id() {return "hideGiftButton";}
|
||||
|
||||
enabled() {
|
||||
this.unpatch = this.after(WebpackModules.find(m => m.type && m.type.render && m.type.render.displayName === "ChannelTextAreaContainer").type, "render", (_, __, returnValue) => {
|
||||
this.after(WebpackModules.find(m => m.type && m.type.render && m.type.render.displayName === "ChannelTextAreaContainer").type, "render", (_, __, returnValue) => {
|
||||
const buttons = Utilities.getNestedProp(returnValue, "props.children.props.children.props.children.1.props.children.props.children.2.props.children");
|
||||
if (Array.isArray(buttons)) {
|
||||
for (const button of buttons) {
|
||||
|
@ -24,6 +24,6 @@ export default new class NitroGiftPickerHider extends Builtin {
|
|||
}
|
||||
|
||||
disabled() {
|
||||
this.unpatch();
|
||||
this.unpatchAll();
|
||||
}
|
||||
};
|
|
@ -3,13 +3,15 @@
|
|||
export {default as CustomCSS} from "./customcss";
|
||||
export {default as WindowPrefs} from "./windowprefs";
|
||||
|
||||
export {default as TwentyFourHour} from "./appearance/24hour";
|
||||
export {default as ClassNormalizer} from "./general/classnormalizer";
|
||||
export {default as PublicServers} from "./general/publicservers";
|
||||
export {default as VoiceDisconnect} from "./general/voicedisconnect";
|
||||
|
||||
export {default as TwentyFourHour} from "./appearance/24hour";
|
||||
export {default as ColoredText} from "./appearance/coloredtext";
|
||||
export {default as DarkMode} from "./appearance/darkmode";
|
||||
export {default as HideGIFButton} from "./appearance/hidegifbutton";
|
||||
export {default as HideGiftButton} from "./appearance/hidegiftbutton";
|
||||
export {default as MinimalMode} from "./appearance/minimalmode";
|
||||
export {default as VoiceMode} from "./appearance/voicemode";
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@ export default [
|
|||
collapsible: true,
|
||||
settings: [
|
||||
{type: "switch", id: "twentyFourHour", value: false},
|
||||
{type: "switch", id: "nitroGiftPickerHider", value: false},
|
||||
{type: "switch", id: "gifPickerHider", value: false},
|
||||
{type: "switch", id: "hideGiftButton", value: false},
|
||||
{type: "switch", id: "hideGIFButton", value: false},
|
||||
{type: "switch", id: "voiceMode", value: false},
|
||||
{type: "switch", id: "minimalMode", value: false},
|
||||
{type: "switch", id: "hideChannels", value: false, enableWith: "minimalMode"},
|
||||
|
|
|
@ -56,13 +56,13 @@ export default {
|
|||
name: "Colored Text",
|
||||
note: "Make text colour the same as role color"
|
||||
},
|
||||
gifpickerhider: {
|
||||
name: "Hide Gift Picker",
|
||||
note: "Hides the Gif picker button in the textarea"
|
||||
hideGIFButton: {
|
||||
name: "Hide GIF Button",
|
||||
note: "Hides the GIF picker button in the textarea"
|
||||
},
|
||||
nitroGiftPickerHider: {
|
||||
name: "Hide NitroGift Picker",
|
||||
note: "Hides the NitroGift button in the textarea"
|
||||
hideGiftButton: {
|
||||
name: "Hide Gift Button",
|
||||
note: "Hides the Nitro Gift button in the textarea"
|
||||
}
|
||||
},
|
||||
addons: {
|
||||
|
|
Loading…
Reference in New Issue