diff options
author | lonkaars <loek@pipeframe.xyz> | 2023-01-29 17:42:29 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2023-01-29 17:42:29 +0100 |
commit | e87f29e017a75af15d228d537bc20b9fc78ace24 (patch) | |
tree | cc4a7b76192d32290b569bedbcd8fedec9d7cda2 /yomichan | |
parent | 34ea3829e7cb435a4357b43fcfff514fdd39083e (diff) |
update sentense-export to work with user.js
Diffstat (limited to 'yomichan')
-rw-r--r-- | yomichan/makefile | 5 | ||||
-rw-r--r-- | yomichan/readme.md | 27 |
2 files changed, 30 insertions, 2 deletions
diff --git a/yomichan/makefile b/yomichan/makefile index cc8b50d..1970755 100644 --- a/yomichan/makefile +++ b/yomichan/makefile @@ -34,8 +34,9 @@ yomichan/search.html.bak: yomichan/search.html.patched: search.html.diff yomichan/settings.html.patched: settings.html.diff yomichan/manifest.json.patched: yomichan/manifest.json.bak - jq '.content_scripts[0].js[.content_scripts[0].js | length] |= .+ "js/userscript-loader.js"' $< > $@ - jq '.content_security_policy |= .+ "'"; script-src 'self' 'unsafe-eval'"'"' $< > $@ + jq '.content_scripts[0].js[.content_scripts[0].js | length] |= .+ "js/userscript-loader.js"' $< |\ + jq '.content_security_policy |= .+ "'"; script-src 'self' 'unsafe-eval'"'"' |\ + jq '.content_security_policy |= sub("img-src";"img-src data:")' > $@ download: yomichan backup: download diff --git a/yomichan/readme.md b/yomichan/readme.md new file mode 100644 index 0000000..97f9904 --- /dev/null +++ b/yomichan/readme.md @@ -0,0 +1,27 @@ +# yomichan patch stuff + +adds a user.js script to your config and settings page that runs in the search +page and popup window. + +![](../assets/userscript.png) + +## set-up + +to download the latest yomichan version and patch it, leaving all files exposed +for later updating (unpacked extension), run the following command: + +> updating is currently broken, so you have to run `make clean` before `make +> patch` to prevent the .html.patch files from being applied twice + +``` +make patch +``` + +to patch yomichan and convert it back to a zip (packed extension, non-signed, +for use with kiwi browser), run: + +``` +make yomichan-chrome-patched.zip +``` + +if you want to update the patch or zip, replace `make` with `make -B`. |