MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / getNotice

Function getNotice

qtx.js:325–347  ·  view source on GitHub ↗

* 获取远程通知

()

Source from the content-addressed store, hash-verified

323 * 获取远程通知
324 */
325async 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}
348function ts13() {
349 return Math.round(new Date().getTime()).toString();
350}

Callers

nothing calls this directly

Calls 3

httpRequestFunction · 0.70
DoubleLogMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected