aboutsummaryrefslogtreecommitdiff
path: root/yomichan
diff options
context:
space:
mode:
Diffstat (limited to 'yomichan')
-rw-r--r--yomichan/.gitignore4
-rw-r--r--yomichan/custom.css2
-rw-r--r--yomichan/makefile30
-rw-r--r--yomichan/readme.md4
-rw-r--r--yomichan/sentence-export.js7
5 files changed, 46 insertions, 1 deletions
diff --git a/yomichan/.gitignore b/yomichan/.gitignore
new file mode 100644
index 0000000..c692a18
--- /dev/null
+++ b/yomichan/.gitignore
@@ -0,0 +1,4 @@
+*.src
+yomichan-settings-*.json
+yomichan
+yomichan-chrome.zip
diff --git a/yomichan/custom.css b/yomichan/custom.css
index 6c132ab..0458a3b 100644
--- a/yomichan/custom.css
+++ b/yomichan/custom.css
@@ -6,7 +6,7 @@
border: 2px solid var(--tag-color);
border-radius: 6px;
}
-.frequency-group-tag { border: none !important; }
+.frequency-group-tag .tag { border: none !important; }
.tag .tag-body::before { display: none; }
.frequency-value {
color: var(--tag-color);
diff --git a/yomichan/makefile b/yomichan/makefile
new file mode 100644
index 0000000..a4f19df
--- /dev/null
+++ b/yomichan/makefile
@@ -0,0 +1,30 @@
+all:
+
+.PHONY: clean patch update
+
+include ../common.mk
+
+yomichan/js/user.js: sentence-export.min.js yomichan
+ ln -sf ../../$< $@
+
+yomichan-chrome.zip:
+ curl https://github.com/FooSoft/yomichan/releases/latest/download/$@ -Lso- > $@
+
+yomichan: yomichan-chrome.zip
+ unzip -qo yomichan-chrome.zip -d yomichan
+
+yomichan/manifest.json.bak: yomichan/manifest.json
+ mv $< $@
+ jq '.content_scripts[0].js[.content_scripts[0].js | length] |= .+ "js/user.js"' $@ > $<
+
+yomichan/search.html.bak: yomichan/search.html
+ mv $< $@
+ sed 's#</body>#<script defer src="/js/user.js"></script>\n</body>#' $@ > $<
+
+patch: yomichan yomichan/search.html.bak yomichan/manifest.json.bak
+
+update: yomichan
+
+clean:
+ $(RM) sentence-export.min.js sentence-export.src
+
diff --git a/yomichan/readme.md b/yomichan/readme.md
new file mode 100644
index 0000000..5459c21
--- /dev/null
+++ b/yomichan/readme.md
@@ -0,0 +1,4 @@
+# yomichan stuff
+
+- [custom css](custom.css)
+- and a userscript injection makefile (WIP)
diff --git a/yomichan/sentence-export.js b/yomichan/sentence-export.js
new file mode 100644
index 0000000..c01e985
--- /dev/null
+++ b/yomichan/sentence-export.js
@@ -0,0 +1,7 @@
+function run() {
+ console.log("it workey");
+}
+
+run();
+window.onload = () => run();
+