From e87f29e017a75af15d228d537bc20b9fc78ace24 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sun, 29 Jan 2023 17:42:29 +0100 Subject: update sentense-export to work with user.js --- yomichan/makefile | 5 +++-- yomichan/readme.md | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 yomichan/readme.md (limited to 'yomichan') 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`. -- cgit v1.2.3