debug
This commit is contained in:
@@ -27,6 +27,14 @@ if ($.isNode()) {
|
||||
cookiesArr.push(jdCookieNode[item])
|
||||
})
|
||||
if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {};
|
||||
} else {
|
||||
let cookiesData = $.getdata('CookiesJD') || "[]";
|
||||
cookiesData = jsonParse(cookiesData);
|
||||
cookiesArr = cookiesData.map(item => item.cookie);
|
||||
cookiesArr.reverse();
|
||||
cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]);
|
||||
cookiesArr.reverse();
|
||||
cookiesArr = cookiesArr.filter(item => item !== "" && item !== null && item !== undefined);
|
||||
}
|
||||
!(async() => {
|
||||
if (!cookiesArr[0]) {
|
||||
@@ -284,6 +292,17 @@ function requireConfig() {
|
||||
});
|
||||
})
|
||||
}
|
||||
function jsonParse(str) {
|
||||
if (typeof str == "string") {
|
||||
try {
|
||||
return JSON.parse(str);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
$.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie')
|
||||
return [];
|
||||
}
|
||||
}
|
||||
}
|
||||
function timeFormat(time) {
|
||||
let date;
|
||||
if (time) {
|
||||
|
Reference in New Issue
Block a user