* 获取远程通知
()
| 323 | * 获取远程通知 |
| 324 | */ |
| 325 | async function getNotice() { |
| 326 | try { |
| 327 | const urls = [ |
| 328 | "https://fastly.jsdelivr.net/gh/smallfawn/Note@main/Notice.json", |
| 329 | "https://gcore.jsdelivr.net/gh/smallfawn/Note@main/Notice.json", |
| 330 | "https://cdn.jsdelivr.net/gh/smallfawn/Note@main/Notice.json", |
| 331 | "https://ghproxy.com/https://raw.githubusercontent.com/smallfawn/Note/main/Notice.json", |
| 332 | "https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json", |
| 333 | ]; |
| 334 | let notice = null; |
| 335 | for (const url of urls) { |
| 336 | const options = { url, headers: { "User-Agent": "" }, }; |
| 337 | const result = await httpRequest(options); |
| 338 | if (result && "notice" in result) { |
| 339 | notice = result.notice.replace(/\\n/g, "\n"); |
| 340 | break; |
| 341 | } |
| 342 | } |
| 343 | if (notice) { $.DoubleLog(notice); } |
| 344 | } catch (e) { |
| 345 | console.log(e); |
| 346 | } |
| 347 | } |
| 348 | function ts13() { |
| 349 | return Math.round(new Date().getTime()).toString(); |
| 350 | } |
nothing calls this directly
no test coverage detected