diff options
author | Teddy Wing | 2021-03-21 15:36:48 +0100 |
---|---|---|
committer | Teddy Wing | 2021-03-21 17:45:12 +0100 |
commit | db45d89fc0acf1999c2b996397d2872159c0b74c (patch) | |
tree | 54d838270905976e93ca2100a661b7160b95fd78 /main.js.in | |
parent | d938c8053540d34a00925e0960ac80dbddfc7a26 (diff) | |
download | Peniquitous-db45d89fc0acf1999c2b996397d2872159c0b74c.tar.bz2 |
Work out the proper way to import scripts
In order to import our script dependencies and inject them correctly
into the page, we need to remove the existing IIFEs, append them to the
page in `<script>` tags, and wrap them in custom IIFEs.
If I leave the original IIFEs, they get executed too early, and I can't
insert the scripts into the page correctly.
Got the custom IIFE idea from Max Shawabkeh
(https://stackoverflow.com/users/181765/max-shawabkeh) on Stack
Overflow:
https://stackoverflow.com/questions/2303147/injecting-js-functions-into-the-page-from-a-greasemonkey-script-on-chrome/2303228#2303228
This is working now, but I want a way to build the final user script
without copy-pasting the imports in the main file. Going to work out the
build rules next.
Diffstat (limited to 'main.js.in')
0 files changed, 0 insertions, 0 deletions