PageSourceSearch

https://avm-mag.com/wp-content/plugins/web-push-service/lib/Frontend_Scripts/_js/cookies.js?ver=1782151874

js avm-mag.com collected 2026-10-02 07:58:28 UTC 817 bytes, 35 lines download raw bytes

1export const localStorageKey = {
2    blocked: "blocked-notification-permission-popup",
3    dismiss: "dismiss-notification-permission-popup",
4    agree: "agree-notification-permission-popup"
5} 
6
7export const setLocalStorage = (name, value, days = 1) => {
8    const date = new Date()
9
10    date.setDate(date.getDate() + days)
11
12    const object = {value: value, timestamp: date.getTime()}
13    
14    localStorage.setItem(name, JSON.stringify(object))
15}
16
17
18export const getLocalStorage = name => {
19    const object = JSON.parse(localStorage.getItem(name))
20
21    if(!object) {
22       return null
23    }
24
25    const dateString = Number(object.timestamp)
26    
27    const now = new Date().getTime()
28
29    if(dateString > now){
30        return object.value
31    } else {
32        localStorage.removeItem(name)
33        return null
34    }
35}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.