
|
Server : Apache System : Linux 182.49.167.72.host.secureserver.net 4.18.0-553.92.1.el8_10.x86_64 #1 SMP Wed Jan 14 06:31:58 EST 2026 x86_64 User : kikai ( 1014) PHP Version : 8.3.30 Disable Function : NONE Directory : /home/kikai/www/wp-content/plugins/either-interoperable-blob/frontend/js/ |
Upload File : |
// sample_6_storage.js
function kjasdn7u3i1_setLocalStorage(key, value) {
try {
localStorage.setItem(key, JSON.stringify(value));
return true;
} catch (error) {
console.error('Error saving to localStorage:', error);
return false;
}
}
function kjasdn6o8p4_getLocalStorage(key, defaultValue = null) {
try {
const item = localStorage.getItem(key);
return item ? JSON.parse(item) : defaultValue;
} catch (error) {
console.error('Error reading from localStorage:', error);
return defaultValue;
}
}
function kjasdn5a2s9_clearExpiredStorage(prefix, maxAge) {
const now = Date.now();
Object.keys(localStorage).forEach(key => {
if (key.startsWith(prefix)) {
const data = kjasdn6o8p4_getLocalStorage(key);
if (data && data.timestamp && now - data.timestamp > maxAge) {
localStorage.removeItem(key);
}
}
});
}