(icon)
| 2416 | |
| 2417 | //获取可莉图标集 |
| 2418 | async function getIcon(icon) { |
| 2419 | let url = 'https://raw.githubusercontent.com/luestr/IconResource/main/KeLee_icon.json' |
| 2420 | let kicon = $.getjson('Parser_Kelee_icon') |
| 2421 | if (!kicon) { |
| 2422 | kicon = $.toObj((await http(url)).body)['icons'] |
| 2423 | $.setjson(kicon, 'Parser_Kelee_icon') |
| 2424 | } |
| 2425 | for (let i = 0; i < kicon.length; i++) { |
| 2426 | if (kicon[i].name == icon) return kicon[i].url |
| 2427 | } |
| 2428 | kicon = $.toObj((await http(url)).body)['icons'] |
| 2429 | $.setjson(kicon, 'Parser_Kelee_icon') |
| 2430 | for (let i = 0; i < kicon.length; i++) { |
| 2431 | if (kicon[i].name == icon) return kicon[i].url |
| 2432 | } |
| 2433 | return 'icon not found' |
| 2434 | } |
| 2435 | |
| 2436 | //reject |
| 2437 | function rw_reject(x, mark) { |
no test coverage detected