add URL to metadata of plugins installed via UI

(this is a breaking change!)
master
Drake 2 years ago
parent 55440b2776
commit e28c8f53be

@ -1,8 +1,3 @@
//in theory this should never be unset? but just as a sanity check
//#ifnset _CORS_URL
//#set _CORS_URL = "https://cors.ruthenic.com/"
//#endif
import { React, nests, nestsReact } from "../../common";
import { add } from "../../plugin";
import webpack from "../../webpack";
@ -24,7 +19,7 @@ export default () => {
<Flex basis="auto" grow={1} shrink={1}>
<TextInput
className="demon-settings-url"
placeholder="https://git.ruthenic.com/ruthenic/demoncord-noReplyMention/raw/branch/master/dist/plugin.js"
placeholder="Raw link to plugin"
type="text"
value={input}
onChange={setInput}
@ -33,7 +28,9 @@ export default () => {
const text = await (
await fetch("$_CORS_URL" + input)
).text();
add(text);
add(text, {
url: input
});
setInput("");
}
}}

Loading…
Cancel
Save