Change: use localStorage instead of sessionStorage
This commit is contained in:
parent
5504138857
commit
911108c3b4
|
@ -57,11 +57,11 @@ const APPLY = (() => {
|
||||||
updateCount();
|
updateCount();
|
||||||
updateExposeIframes();
|
updateExposeIframes();
|
||||||
try {
|
try {
|
||||||
// FIXME: use try-catch since accessing sessionStorage may throw?
|
// FIXME: use try-catch since accessing localStorage may throw?
|
||||||
if (styleInjector.list.length) {
|
if (styleInjector.list.length) {
|
||||||
sessionStorage.setItem('stylusStyleCount', styleInjector.list.length);
|
localStorage.setItem('stylusStyleCount', styleInjector.list.length);
|
||||||
} else {
|
} else {
|
||||||
sessionStorage.removeItem('stylusStyleCount');
|
localStorage.removeItem('stylusStyleCount');
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// pass
|
// pass
|
||||||
|
@ -101,8 +101,8 @@ const APPLY = (() => {
|
||||||
let ready;
|
let ready;
|
||||||
let styleCount;
|
let styleCount;
|
||||||
try {
|
try {
|
||||||
// FIXME: use try-catch since accessing sessionStorage may throw?
|
// FIXME: use try-catch since accessing localStorage may throw?
|
||||||
styleCount = sessionStorage.getItem('stylusStyleCount');
|
styleCount = localStorage.getItem('stylusStyleCount');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// pass
|
// pass
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user