summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaoran S. Diao <0@hairydiode.xyz>2019-11-04 18:16:41 -0800
committerHaoran S. Diao <0@hairydiode.xyz>2019-11-04 18:16:41 -0800
commit70006fe542d010a1f7827528c5583aba1360b8f6 (patch)
tree2c472e6c84ca38238a6486680f06b2fc963ae160
parentaf75f3b99b042cc2b035cc5c5fdca7214992b4fb (diff)
以附和汉典新元素属性名称规则补加了两个正则表达式复改函数,老函数仍然存在。
此后附加组件不会以「Mozilla」签证的.xpi文件出传安装,直接用.zip文件安装。
-rw-r--r--zdic.js13
-rw-r--r--去英.zipbin4329 -> 4455 bytes
2 files changed, 13 insertions, 0 deletions
diff --git a/zdic.js b/zdic.js
index 920f411..5eaac32 100644
--- a/zdic.js
+++ b/zdic.js
@@ -5,3 +5,16 @@ for(i=0; i < tabpages.length; i++){
e.innerHTML = e.innerHTML.replace(/\[.*[a-z].*\]/gi,"「去英」");
e.innerHTML = e.innerHTML.replace(/\<span.*\>[a-z].*?[a-z]\<\/span\>/gi,"「去英」");
}
+
+foreignSpans = document.getElementsByClassName("encs");
+for (i = 0; i < foreignSpans.length; i++) {
+ s = foreignSpans[i];
+ s.innerHTML = s.innerHTML.replace(/.*/,"「去英」");
+}
+paragraphs = document.getElementsByTagName("p");
+for(i=0; i < paragraphs.length; i++){
+ p = paragraphs[i];
+ p.innerHTML = p.innerHTML.replace(/\<span.*z_ts2.*\>德语\<\/span\>.*/,"「去英」");
+ p.innerHTML = p.innerHTML.replace(/\<span.*z_ts2.*\>英语\<\/span\>.*/,"「去英」");
+ p.innerHTML = p.innerHTML.replace(/\<span.*z_ts2.*\>法语\<\/span\>.*/,"「去英」");
+}
diff --git a/去英.zip b/去英.zip
index e698017..f15ac23 100644
--- a/去英.zip
+++ b/去英.zip
Binary files differ