MCPcopy Create free account
hub / github.com/chavyleung/scripts / signinfo

Function signinfo

ithome/ithome.js:70–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68}
69
70function signinfo() {
71 return new Promise((resolve) => {
72 const userHash = $.getdata($.userHash);
73 const url = {
74 url: `https://napi.ithome.com/api/usersign/getsigninfo?userHash=${userHash}`,
75 headers: {},
76 };
77 url.headers["User-Agent"] =
78 "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 ithome/rmsdklevel2/day/7.32";
79 $.get(url, (err, resp, data) => {
80 try {
81 $.signinfo = JSON.parse(data);
82 } catch (e) {
83 $.logErr(e, resp);
84 } finally {
85 resolve();
86 }
87 });
88 });
89}
90
91function encrypt(str) {
92 const key = `HCa%Y|7#`;

Callers 1

ithome.jsFile · 0.85

Calls 3

getdataMethod · 0.45
getMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected