diff options
author | Haoran S. Diao <0@hairydiode.xyz> | 2019-11-04 18:16:41 -0800 |
---|---|---|
committer | Haoran S. Diao <0@hairydiode.xyz> | 2019-11-04 18:16:41 -0800 |
commit | 70006fe542d010a1f7827528c5583aba1360b8f6 (patch) | |
tree | 2c472e6c84ca38238a6486680f06b2fc963ae160 | |
parent | af75f3b99b042cc2b035cc5c5fdca7214992b4fb (diff) |
以附和汉典新元素属性名称规则补加了两个正则表达式复改函数,老函数仍然存在。
此后附加组件不会以「Mozilla」签证的.xpi文件出传安装,直接用.zip文件安装。
-rw-r--r-- | zdic.js | 13 | ||||
-rw-r--r-- | 去英.zip | bin | 4329 -> 4455 bytes |
2 files changed, 13 insertions, 0 deletions
@@ -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\>.*/,"「去英」"); +} Binary files differ |