summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaoran S. Diao <0@hairydiode.xyz>2019-02-11 16:00:04 -0500
committerHaoran S. Diao <0@hairydiode.xyz>2019-02-11 16:00:04 -0500
commit7a152667754d78d426660bb319a88e85690ffb2c (patch)
treefbd00b74a84e8a1d6e129ead8de7bda9f72f4fdd
initial commit
-rw-r--r--icon.pngbin0 -> 3137 bytes
-rw-r--r--icon.xcfbin0 -> 7011 bytes
-rw-r--r--manifest.json23
-rw-r--r--xinhua.js1
-rw-r--r--zdic.js7
5 files changed, 31 insertions, 0 deletions
diff --git a/icon.png b/icon.png
new file mode 100644
index 0000000..72688d9
--- /dev/null
+++ b/icon.png
Binary files differ
diff --git a/icon.xcf b/icon.xcf
new file mode 100644
index 0000000..06b6eea
--- /dev/null
+++ b/icon.xcf
Binary files differ
diff --git a/manifest.json b/manifest.json
new file mode 100644
index 0000000..41b6c64
--- /dev/null
+++ b/manifest.json
@@ -0,0 +1,23 @@
+{
+ "manifest_version": 2,
+ "name": "去英",
+ "version": "0.1",
+
+ "description": "去掉《汉典》和《新华字典》里的英文解说",
+
+ "icons": {
+ "96": "icon.png"
+ },
+
+ "content_scripts": [
+ {
+ "matches": ["*://*.xh.5156edu.com/*"],
+ "js": ["xinhua.js"]
+ },
+ {
+ "matches": ["*://*.zdic.net/*"],
+ "js": ["zdic.js"]
+ }
+ ]
+
+}
diff --git a/xinhua.js b/xinhua.js
new file mode 100644
index 0000000..b527e95
--- /dev/null
+++ b/xinhua.js
@@ -0,0 +1 @@
+document.body.innerHTML = document.body.innerHTML.replace(/〖[a-z].*?[a-z]〗/g,"「去英」");
diff --git a/zdic.js b/zdic.js
new file mode 100644
index 0000000..422450f
--- /dev/null
+++ b/zdic.js
@@ -0,0 +1,7 @@
+tabpages = document.getElementsByClassName("tab-page");
+for(i=0; i < tabpages.length; i++){
+ e = tabpages[i];
+ e.innerHTML = e.innerHTML.replace(/English.*[a-z].*/g,"「去英」");
+ e.innerHTML = e.innerHTML.replace(/\[.*[a-z].*\]/g,"「去英」");
+ e.innerHTML = e.innerHTML.replace(/\<span.*\>.*[a-z].*\<\/span\>/g,"「去英」");
+}