(icon)
| 2013 | |
| 2014 | //获取可莉图标集 |
| 2015 | async function getIcon(icon) { |
| 2016 | let url = 'https://raw.githubusercontent.com/luestr/IconResource/main/KeLee_icon.json' |
| 2017 | let kicon = $.getjson('Parser_Kelee_icon') |
| 2018 | if (!kicon) { |
| 2019 | kicon = $.toObj((await http(url)).body)['icons'] |
| 2020 | $.setjson(kicon, 'Parser_Kelee_icon') |
| 2021 | } |
| 2022 | for (let i = 0; i < kicon.length; i++) { |
| 2023 | if (kicon[i].name == icon) return kicon[i].url |
| 2024 | } |
| 2025 | kicon = $.toObj((await http(url)).body)['icons'] |
| 2026 | $.setjson(kicon, 'Parser_Kelee_icon') |
| 2027 | for (let i = 0; i < kicon.length; i++) { |
| 2028 | if (kicon[i].name == icon) return kicon[i].url |
| 2029 | } |
| 2030 | return 'icon not found' |
| 2031 | } |
| 2032 | |
| 2033 | //reject |
| 2034 | function rw_reject(x, mark) { |
no test coverage detected