Skip to content

Commit 6e90e27

Browse files
authored
Added update to storage
1 parent f260d36 commit 6e90e27

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pages/home.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ function getCookie(name) {
55
if (parts.length === 2) return parts.pop().split(';').shift();
66
}
77
// get cookie
8+
9+
if (getCookie('ST Features') === undefined) {
10+
document.cookie = `ST Features=${getCookie('ST Features') + 'ST '}; expires=Thu, 18 Dec 9999 12:00:00 UTC; path=/`;
11+
}
12+
813
if (window.location.href === "https://scratch.mit.edu/") {
914
if (getCookie('ST Features').includes('scratch-news-recent')) {
1015
titles()
@@ -247,4 +252,4 @@ document.querySelector('#navigation > div > ul > li.link.right.login-item > div
247252
document.querySelector('#navigation > div > ul > li.link.right.login-item > div > div').appendChild(elem)
248253
document.querySelector('#navigation > div > ul > li.link.right.login-item > div > div > label').appendChild(el)
249254
}
250-
}
255+
}

0 commit comments

Comments
 (0)