Fixed loading after reset
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @name IITC plugin: 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
|
||||
// @author vikend
|
||||
// @icon
|
||||
@@ -260,12 +260,17 @@ function wrapper(plugin_info)
|
||||
|
||||
window.plugin.restoolsBBWatchReloaded.loadStorage = function() {
|
||||
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]);
|
||||
}
|
||||
else {
|
||||
return window.plugin.restoolsBBWatchReloaded.WAVE_PORTALS;
|
||||
}
|
||||
}
|
||||
else {
|
||||
return window.plugin.restoolsBBWatchReloaded.WAVE_PORTALS;
|
||||
}
|
||||
}
|
||||
|
||||
window.plugin.restoolsBBWatchReloaded.resetStorage = function() {
|
||||
localStorage[window.plugin.restoolsBBWatchReloaded.BB_STORAGE] = null;
|
||||
|
||||
Reference in New Issue
Block a user