Type check
This commit is contained in:
parent
f8f34ef605
commit
e8f2c00170
@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Mann Co. Store Giveaway Autojoiner
|
// @name Mann Co. Store Giveaway Autojoiner
|
||||||
// @namespace http://tampermonkey.net/
|
// @namespace http://tampermonkey.net/
|
||||||
// @version 2026-08-18
|
// @version 2026-08-19
|
||||||
// @description Tries to join giveaways on page load
|
// @description Tries to join giveaways on page load
|
||||||
// @author Abhorrent_Anger
|
// @author Abhorrent_Anger
|
||||||
// @include /^https?:\/\/mannco\.store\/giveaways.?$/
|
// @include /^https?:\/\/mannco\.store\/giveaways.?$/
|
||||||
@ -48,7 +48,10 @@ const getCookieValue = (name) => (
|
|||||||
function getTokenFromCookie(tokenName) {
|
function getTokenFromCookie(tokenName) {
|
||||||
let authArray = getCookieValue(tokenName);
|
let authArray = getCookieValue(tokenName);
|
||||||
let decodedAuthArray = decodeURIComponent(authArray);
|
let decodedAuthArray = decodeURIComponent(authArray);
|
||||||
let array = JSON.parse(decodedAuthArray)
|
if (typeof decodedAuthArray !== 'string') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
let array = JSON.parse(decodedAuthArray);
|
||||||
if (Array.isArray(array)) {
|
if (Array.isArray(array)) {
|
||||||
return array['token'];
|
return array['token'];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user