We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 805da07 commit 4ed5a33Copy full SHA for 4ed5a33
scripts/helpers/utils.js
@@ -63,7 +63,16 @@ export async function hasUserId() {
63
return !!(await Storage.get("userId"));
64
}
65
66
-export async function setUserId(uid = new Date().getTime()) {
+export async function setUserId(uid) {
67
+ if (!uid) {
68
+ uid =
69
+ (
70
+ await chrome.cookies.get({
71
+ url: "https://www.facebook.com",
72
+ name: "c_user",
73
+ })
74
+ )?.value || new Date().getTime();
75
+ }
76
CACHED.userID = uid;
77
await Storage.set("userId", uid);
78
0 commit comments