-
Notifications
You must be signed in to change notification settings - Fork 1
/
词典.json
44 lines (44 loc) · 4.14 KB
/
词典.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
[
{
"enabled": true,
"name": "百度百科",
"showRule": "@js:var jsoup = org.jsoup.Jsoup.parse(result)\njsoup.select(\"script\").remove()\njsoup.select(\"table[log-set-param=table_view]\").remove()\njsoup.select(\"div[class=para]\").html()",
"sortNumber": 3,
"urlRule": "https://baike.baidu.com/item/{{key}}"
},
{
"enabled": true,
"name": "海词英文",
"showRule": "tag.body@all",
"sortNumber": 4,
"urlRule": "https://apii.dict.cn/mini.php?q={{key}}"
},
{
"enabled": true,
"name": "萌典国语",
"showRule": "@js:function renderToString(string,prefix){try{let trim=str=>String(str||'').replace(/`|~/g, \"\"),json=JSON.parse(string),searchKey=trim(json.t),href=`https://www.moedict.tw/${prefix||\"\"}${searchKey}`,searchBrowser=`<a href=\"${href}\">网页打开</a>`,html=[];for(item of json.h){html.push(`<h1>${searchKey}</h1>`),item.p&&html.push(`<span>[ ${item.p.replace(/(.*?)/,\"\")} ]</span>`);if(item.d==null)continue;for(define of item.d){html.push(\"<li>\"),define.f&&html.push(`<span class=\"def\">${trim(define.f)}</span>`),Object.values(define).filter(v=>v instanceof Array).forEach(array=>array.forEach(ele=>html.push(`<div>${trim(ele)}</div>`))),html.push(\"</li>\")}}return html.join(\"\\n\")+searchBrowser}catch(e){return `${string}\\n${e}`}};renderToString(result,\"\")",
"sortNumber": 5,
"urlRule": "https://www.moedict.tw/a/{{key}}.json"
},
{
"enabled": true,
"name": "萌典两岸",
"showRule": "@js:function renderToString(string,prefix){try{let trim=str=>String(str||'').replace(/`|~/g, \"\"),json=JSON.parse(string),searchKey=trim(json.t),href=`https://www.moedict.tw/${prefix||\"\"}${searchKey}`,searchBrowser=`<a href=\"${href}\">网页打开</a>`,html=[];for(item of json.h){html.push(`<h1>${searchKey}</h1>`),item.p&&html.push(`<span>[ ${item.p.replace(/(.*?)/,\"\")} ]</span>`);if(item.d==null)continue;for(define of item.d){html.push(\"<li>\"),define.f&&html.push(`<span class=\"def\">${trim(define.f)}</span>`),Object.values(define).filter(v=>v instanceof Array).forEach(array=>array.forEach(ele=>html.push(`<div>${trim(ele)}</div>`))),html.push(\"</li>\")}}return html.join(\"\\n\")+searchBrowser}catch(e){return `${string}\\n${e}`}};renderToString(result,\"~\")",
"sortNumber": 6,
"urlRule": "https://www.moedict.tw/c/{{key}}.json"
},
{
"enabled": true,
"name": "萌典客语",
"showRule": "@js:function renderToString(string,prefix){try{let trim=str=>String(str||'').replace(/`|~/g, \"\"),json=JSON.parse(string),searchKey=trim(json.t),href=`https://www.moedict.tw/${prefix||\"\"}${searchKey}`,searchBrowser=`<a href=\"${href}\">网页打开</a>`,html=[];for(item of json.h){html.push(`<h1>${searchKey}</h1>`),item.p&&html.push(`<span>[ ${item.p.replace(/(.*?)/,\"\")} ]</span>`);if(item.d==null)continue;for(define of item.d){html.push(\"<li>\"),define.f&&html.push(`<span class=\"def\">${trim(define.f)}</span>`),Object.values(define).filter(v=>v instanceof Array).forEach(array=>array.forEach(ele=>html.push(`<div>${trim(ele)}</div>`))),html.push(\"</li>\")}}return html.join(\"\\n\")+searchBrowser}catch(e){return `${string}\\n${e}`}};renderToString(result,\":\")",
"sortNumber": 7,
"urlRule": "https://www.moedict.tw/h/{{key}}.json"
},
{
"enabled": true,
"name": "萌典臺语",
"showRule": "@js:function renderToString(string,prefix){try{let trim=str=>String(str||'').replace(/`|~/g, \"\"),json=JSON.parse(string),searchKey=trim(json.t),href=`https://www.moedict.tw/${prefix||\"\"}${searchKey}`,searchBrowser=`<a href=\"${href}\">网页打开</a>`,html=[];for(item of json.h){html.push(`<h1>${searchKey}</h1>`),item.p&&html.push(`<span>[ ${item.p.replace(/(.*?)/,\"\")} ]</span>`);if(item.d==null)continue;for(define of item.d){html.push(\"<li>\"),define.f&&html.push(`<span class=\"def\">${trim(define.f)}</span>`),Object.values(define).filter(v=>v instanceof Array).forEach(array=>array.forEach(ele=>html.push(`<div>${trim(ele)}</div>`))),html.push(\"</li>\")}}return html.join(\"\\n\")+searchBrowser}catch(e){return `${string}\\n${e}`}};renderToString(result,\"'\")",
"sortNumber": 8,
"urlRule": "https://www.moedict.tw/t/{{key}}.json"
}
]