Replace square-bracket notation with dot notation
parent
df24a681b0
commit
e30728bde5
|
@ -383,7 +383,7 @@ function isCookieExpired(cookie) {
|
||||||
let expiredCookies = false;
|
let expiredCookies = false;
|
||||||
|
|
||||||
// Ignore cookies that never expire
|
// Ignore cookies that never expire
|
||||||
const expirationUnixTimestamp = cookie["expire"];
|
const expirationUnixTimestamp = cookie.expire;
|
||||||
|
|
||||||
if (expirationUnixTimestamp !== "-1") {
|
if (expirationUnixTimestamp !== "-1") {
|
||||||
// Convert UNIX epoch timestamp to normal Date
|
// Convert UNIX epoch timestamp to normal Date
|
||||||
|
@ -392,7 +392,7 @@ function isCookieExpired(cookie) {
|
||||||
if (expirationDate < Date.now()) {
|
if (expirationDate < Date.now()) {
|
||||||
if (shared.debug)
|
if (shared.debug)
|
||||||
console.log(
|
console.log(
|
||||||
"Cookie " + cookie["name"] + " expired, you need to re-authenticate"
|
"Cookie " + cookie.name + " expired, you need to re-authenticate"
|
||||||
);
|
);
|
||||||
expiredCookies = true;
|
expiredCookies = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,9 +56,9 @@ module.exports.getGameInfo = async function (browser, url) {
|
||||||
info.f95url = url;
|
info.f95url = url;
|
||||||
info.version = info.isMod
|
info.version = info.isMod
|
||||||
? parsedInfos["MOD VERSION"]
|
? parsedInfos["MOD VERSION"]
|
||||||
: parsedInfos["VERSION"];
|
: parsedInfos.VERSION;
|
||||||
info.lastUpdate = info.isMod
|
info.lastUpdate = info.isMod
|
||||||
? parsedInfos["UPDATED"]
|
? parsedInfos.UPDATED
|
||||||
: parsedInfos["THREAD UPDATED"];
|
: parsedInfos["THREAD UPDATED"];
|
||||||
info.previewSource = await previewSource;
|
info.previewSource = await previewSource;
|
||||||
info.changelog = (await changelog) || "Unknown changelog";
|
info.changelog = (await changelog) || "Unknown changelog";
|
||||||
|
|
Loading…
Reference in New Issue