22 | );
23 | }
24 |
25 | export default App;
26 |
--------------------------------------------------------------------------------
/userscript/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
4 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
12 | monospace;
13 | }
14 |
--------------------------------------------------------------------------------
/userscript/src/index.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { createRoot } from "react-dom/client";
3 | import "./index.css";
4 | import App from "./App";
5 | import { awaitElement, log, addLocationChangeCallback } from "./utils";
6 |
7 | log("React script has successfully started");
8 |
9 | // Do required initial work. Gets called every time the URL changes,
10 | // so that elements can be re-inserted as a user navigates a page with
11 | // different routes.
12 | async function main() {
13 | // Find