Skip to content

Commit 6293201

Browse files
committed
remove unused code to fix plugin
1 parent acc203b commit 6293201

File tree

1 file changed

+1
-30
lines changed

1 file changed

+1
-30
lines changed

open-in-mpv.plugin.js

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @name open in mpv
33
* @author binarynoise
44
* @description Use the context menu to open a video in mpv.
5-
* @version 2.2.0
5+
* @version 2.2.1
66
* @source https://github.com/binarynoise/open-in-mpv
77
* @donate https://paypal.me/binarynoise
88
*/
@@ -67,35 +67,6 @@ function downloadSetup() {
6767
}
6868
}
6969

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-
9970
module.exports = () => ({
10071
start() {
10172
const saved = BdApi.Data.load("open-in-mpv", "settings");

0 commit comments

Comments
 (0)