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

Function getCookies

jd_cfdtx.js:106–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104}
105
106function getCookies() {
107 if ($.isNode()) {
108 $.cookieArr = Object.values(jdCookieNode);
109 } else {
110 const CookiesJd = JSON.parse($.getdata("CookiesJD") || "[]").filter(x => !!x).map(x => x.cookie);
111 $.cookieArr = [$.getdata("CookieJD") || "", $.getdata("CookieJD2") || "", ...CookiesJd];
112 }
113 if (!$.cookieArr[0]) {
114 $.msg(
115 $.name,
116 "【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取",
117 "https://bean.m.jd.com/",
118 {
119 "open-url": "https://bean.m.jd.com/",
120 }
121 );
122 return false;
123 }
124 return true;
125}
126
127function getTokens() {
128 if ($.isNode()) {

Callers 1

jd_cfdtx.jsFile · 0.70

Calls 3

isNodeMethod · 0.45
getdataMethod · 0.45
msgMethod · 0.45

Tested by

no test coverage detected