MCPcopy Create free account
hub / github.com/Semporia/Scripts / getCookies

Function getCookies

jd_factory_component.js:76–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74 .finally(() => $.done());
75
76function getCookies() {
77 if ($.isNode()) {
78 $.cookieArr = Object.values(jdCookieNode);
79 } else {
80 const CookiesJd = JSON.parse($.getdata("CookiesJD") || "[]").filter(x => !!x).map(x => x.cookie);
81 $.cookieArr = [$.getdata("CookieJD") || "", $.getdata("CookieJD2") || "", ...CookiesJd].filter(x=>!!x);
82 }
83 if (!$.cookieArr[0]) {
84 $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {
85 'open-url': 'https://bean.m.jd.com/',
86 });
87 return false;
88 }
89 return true;
90}
91
92function getUserInfo() {
93 return new Promise(resolve => {

Callers 1

Calls 3

isNodeMethod · 0.45
getdataMethod · 0.45
msgMethod · 0.45

Tested by

no test coverage detected