From 34ea3829e7cb435a4357b43fcfff514fdd39083e Mon Sep 17 00:00:00 2001
From: lonkaars
Date: Sun, 29 Jan 2023 16:46:15 +0100
Subject: separate yomichan into user.js patch and sentence-export plugin
---
yomichan/copy.svg | 3 --
yomichan/custom.css | 23 -----------
yomichan/makefile | 63 +++++++++++++++++------------
yomichan/readme.md | 32 ---------------
yomichan/script.svg | 3 ++
yomichan/search.html.diff | 17 ++++++++
yomichan/sentence-export.css | 1 -
yomichan/sentence-export.js | 85 ----------------------------------------
yomichan/settings.html.diff | 69 ++++++++++++++++++++++++++++++++
yomichan/userscript-loader.js | 6 +++
yomichan/userscript-settings.css | 11 ++++++
11 files changed, 144 insertions(+), 169 deletions(-)
delete mode 100644 yomichan/copy.svg
delete mode 100644 yomichan/custom.css
delete mode 100644 yomichan/readme.md
create mode 100644 yomichan/script.svg
create mode 100644 yomichan/search.html.diff
delete mode 100644 yomichan/sentence-export.css
delete mode 100644 yomichan/sentence-export.js
create mode 100644 yomichan/settings.html.diff
create mode 100644 yomichan/userscript-loader.js
create mode 100644 yomichan/userscript-settings.css
(limited to 'yomichan')
diff --git a/yomichan/copy.svg b/yomichan/copy.svg
deleted file mode 100644
index ff2f5a9..0000000
--- a/yomichan/copy.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/yomichan/custom.css b/yomichan/custom.css
deleted file mode 100644
index 7ce95f8..0000000
--- a/yomichan/custom.css
+++ /dev/null
@@ -1,23 +0,0 @@
-.search-header { margin-top: 12px; }
-.search-options { display: none; }
-:root[data-theme=dark] #content-body { background-color: #000000; }
-:root[data-theme=light] #content-body { background-color: #ffffff; }
-.tag .tag-label { background-color: unset; }
-.tag {
- border: 2px solid var(--tag-color);
- border-radius: 6px;
-}
-.frequency-group-tag .tag { border: none !important; }
-.tag .tag-body::before { display: none; }
-.frequency-value { font-weight: bold; }
-:root[data-theme=dark] .frequency-value { color: var(--tag-color); }
-.search-textbox-container {
- border-radius: 6px;
- overflow: hidden;
-}
-@media (hover: none) {
- .entry .actions .action-button { padding: 16px; }
- .search-header .search-button { width: 48px; }
-}
-:root[data-theme=light] { --tag-text-color: #333; }
-
diff --git a/yomichan/makefile b/yomichan/makefile
index c4bd45e..cc8b50d 100644
--- a/yomichan/makefile
+++ b/yomichan/makefile
@@ -1,11 +1,23 @@
-all: sentence-export.min.js
+all:
-.PHONY: clean patch
+.PHONY: clean patch download backup
include ../common.mk
-yomichan/js/user.js: yomichan sentence-export.min.js
- ln -sf ../../sentence-export.min.js $@
+yomichan/images/%.svg: %.svg
+ cp $< $@
+
+yomichan/css/%.css: %.css
+ cp $< $@
+
+yomichan/js/%.js: %.js
+ cp $< $@
+
+yomichan/%.patched: %.diff
+ patch -so - $(@:.patched=) < $< > $@
+
+yomichan/%.bak: yomichan/%
+ cp $< $@
yomichan-chrome.zip:
curl https://github.com/FooSoft/yomichan/releases/latest/download/$@ -Lso- > $@
@@ -19,29 +31,30 @@ yomichan/manifest.json.bak:
yomichan/search.html.bak:
cp yomichan/search.html $@
-yomichan/manifest-patched.json: yomichan/manifest.json.bak
- jq '.content_scripts[0].js[.content_scripts[0].js | length] |= .+ "js/user.js"' $< > $@
-
-yomichan/search-patched.html: yomichan/search.html.bak
- sed 's#
+
+@@ -128,6 +129,5 @@
+
+
+
+-
+