diff options
author | Haoran S. Diao <0@hairydiode.xyz> | 2019-02-11 16:00:04 -0500 |
---|---|---|
committer | Haoran S. Diao <0@hairydiode.xyz> | 2019-02-11 16:00:04 -0500 |
commit | 7a152667754d78d426660bb319a88e85690ffb2c (patch) | |
tree | fbd00b74a84e8a1d6e129ead8de7bda9f72f4fdd |
initial commit
-rw-r--r-- | icon.png | bin | 0 -> 3137 bytes | |||
-rw-r--r-- | icon.xcf | bin | 0 -> 7011 bytes | |||
-rw-r--r-- | manifest.json | 23 | ||||
-rw-r--r-- | xinhua.js | 1 | ||||
-rw-r--r-- | zdic.js | 7 |
5 files changed, 31 insertions, 0 deletions
diff --git a/icon.png b/icon.png Binary files differnew file mode 100644 index 0000000..72688d9 --- /dev/null +++ b/icon.png diff --git a/icon.xcf b/icon.xcf Binary files differnew file mode 100644 index 0000000..06b6eea --- /dev/null +++ b/icon.xcf 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,"「去英」"); @@ -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,"「去英」"); +} |