|
|
|
@ -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("");
|
|
|
|
|
}
|
|
|
|
|
}}
|
|
|
|
|