Fixed loading after reset
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name IITC plugin: ResTools BB Watch Reloaded
|
// @name IITC plugin: ResTools BB Watch Reloaded
|
||||||
// @namespace https://git.martinvylet.cz/vykend/ResTools-BB-Watch-Reloaded
|
// @namespace https://git.martinvylet.cz/vykend/ResTools-BB-Watch-Reloaded
|
||||||
// @version 0.5.1
|
// @version 0.5.2
|
||||||
// @description Scan window for BBs on ornamented portals, then check results
|
// @description Scan window for BBs on ornamented portals, then check results
|
||||||
// @author vikend
|
// @author vikend
|
||||||
// @icon
|
// @icon
|
||||||
@@ -260,12 +260,17 @@ function wrapper(plugin_info)
|
|||||||
|
|
||||||
window.plugin.restoolsBBWatchReloaded.loadStorage = function() {
|
window.plugin.restoolsBBWatchReloaded.loadStorage = function() {
|
||||||
if (localStorage[window.plugin.restoolsBBWatchReloaded.BB_STORAGE] != undefined) {
|
if (localStorage[window.plugin.restoolsBBWatchReloaded.BB_STORAGE] != undefined) {
|
||||||
|
if (JSON.parse(localStorage[window.plugin.restoolsBBWatchReloaded.BB_STORAGE]) != null) {
|
||||||
return JSON.parse(localStorage[window.plugin.restoolsBBWatchReloaded.BB_STORAGE]);
|
return JSON.parse(localStorage[window.plugin.restoolsBBWatchReloaded.BB_STORAGE]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return window.plugin.restoolsBBWatchReloaded.WAVE_PORTALS;
|
return window.plugin.restoolsBBWatchReloaded.WAVE_PORTALS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
return window.plugin.restoolsBBWatchReloaded.WAVE_PORTALS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
window.plugin.restoolsBBWatchReloaded.resetStorage = function() {
|
window.plugin.restoolsBBWatchReloaded.resetStorage = function() {
|
||||||
localStorage[window.plugin.restoolsBBWatchReloaded.BB_STORAGE] = null;
|
localStorage[window.plugin.restoolsBBWatchReloaded.BB_STORAGE] = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user