mirror of
https://github.com/SEPPDROID/JellyCAT.git
synced 2025-10-22 07:54:27 +00:00
46 lines
1.1 KiB
JavaScript
46 lines
1.1 KiB
JavaScript
// /\_/|
|
|
// { ' ' } JellyCAT
|
|
// \____\
|
|
|
|
function printSessionStorage() {
|
|
|
|
var keys = ['test', 'exampleKey2', 'exampleKey3'];
|
|
|
|
keys.forEach(function(key) {
|
|
var value = atv.sessionStorage.getItem(key);
|
|
if (value !== null) {
|
|
console.log(key + ": " + value);
|
|
} else {
|
|
console.log("No value found for key: " + key);
|
|
}
|
|
});
|
|
}
|
|
|
|
function printLocalStorage() {
|
|
|
|
var keys = ['test', 'exampleKey2', 'exampleKey3'];
|
|
|
|
keys.forEach(function(key) {
|
|
var value = atv.localStorage.getItem(key);
|
|
if (value !== null) {
|
|
console.log(key + ": " + value);
|
|
} else {
|
|
console.log("No value found for key: " + key);
|
|
}
|
|
});
|
|
}
|
|
|
|
function setTestSessionStorageItem() {
|
|
// Set an example item in sessionStorage
|
|
atv.sessionStorage.setItem('test', 'exampleValueForSessionStorage');
|
|
console.log('Test item set in sessionStorage.');
|
|
}
|
|
|
|
function setTestLocalStorageItem() {
|
|
// Set an example item in sessionStorage
|
|
atv.localStorage.setItem('test', 'exampleValueForLocalStorage');
|
|
console.log('Test item set in localStorage.');
|
|
}
|
|
|
|
|