|
2 | 2 | * @name open in mpv |
3 | 3 | * @author binarynoise |
4 | 4 | * @description Use the context menu to open a video in mpv. |
5 | | - * @version 2.2.0 |
| 5 | + * @version 2.2.1 |
6 | 6 | * @source https://github.com/binarynoise/open-in-mpv |
7 | 7 | * @donate https://paypal.me/binarynoise |
8 | 8 | */ |
@@ -67,35 +67,6 @@ function downloadSetup() { |
67 | 67 | } |
68 | 68 | } |
69 | 69 |
|
70 | | -const { React, React: { useState }, Webpack: { Filters, getModule } } = BdApi; |
71 | | - |
72 | | -const TheBigBoyBundle = getModule(Filters.byProps("openModal", "FormSwitch", "Anchor")); |
73 | | - |
74 | | -function Switch({ value, note, hideBorder, label }) { |
75 | | - const [enabled, setEnabled] = useState(value); |
76 | | - return (React.createElement(TheBigBoyBundle.FormSwitch, { |
77 | | - value: enabled, note: note, hideBorder: hideBorder, onChange: e => { |
78 | | - setEnabled(e); |
79 | | - |
80 | | - switch (label) { |
81 | | - case "Show Dialog": |
82 | | - settings.showAgain = e; |
83 | | - break; |
84 | | - default: |
85 | | - break; |
86 | | - } |
87 | | - |
88 | | - BdApi.Data.save("open-in-mpv", "settings", settings); |
89 | | - }, |
90 | | - }, label)); |
91 | | -} |
92 | | - |
93 | | -const SettingComponent = () => { |
94 | | - return React.createElement(Switch, { |
95 | | - value: settings.showAgain, /*note: "this is a note",*/ hideBorder: true, onChange: console.log, label: "Show Dialog" |
96 | | - }); |
97 | | -} |
98 | | - |
99 | 70 | module.exports = () => ({ |
100 | 71 | start() { |
101 | 72 | const saved = BdApi.Data.load("open-in-mpv", "settings"); |
|
0 commit comments