Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
iveDoneMessedUp() {
const promises = [
localforage.removeItem("vt.custom.HardMode"),
localforage.removeItem("vt.custom.name"),
localforage.removeItem("vt.custom.notes"),
localforage.removeItem("vt.custom.rom-logic"),
localforage.removeItem("vt.custom.weapons"),
localforage.removeItem("vt.custom.goal"),
localforage.removeItem("vt.custom.logic"),
localforage.removeItem("vt.custom.state"),
localforage.removeItem("randomizer.glitches_required"),
localforage.removeItem("randomizer.item_placement"),
localforage.removeItem("randomizer.dungeon_items"),
localforage.removeItem("randomizer.accessibility"),
localforage.removeItem("randomizer.goal"),
localforage.removeItem("randomizer.tower_open"),
localforage.removeItem("randomizer.ganon_open"),
localforage.removeItem("randomizer.world_state"),
localforage.removeItem("randomizer.hints"),
localforage.removeItem("randomizer.weapons"),
localforage.removeItem("randomizer.item_pool"),
localforage.removeItem("randomizer.item_functionality"),
localforage.removeItem("randomizer.enemy_health"),
function del(key, cb) {
return type(key) != 'array'
? localForage.removeItem(key).then(wrap(cb), cb)
: Promise.all(key.map(del)).then(wrap(cb), cb);
}
localforage.removeItem("vt.custom.notes"),
localforage.removeItem("vt.custom.rom-logic"),
localforage.removeItem("vt.custom.weapons"),
localforage.removeItem("vt.custom.goal"),
localforage.removeItem("vt.custom.logic"),
localforage.removeItem("vt.custom.state"),
localforage.removeItem("randomizer.glitches_required"),
localforage.removeItem("randomizer.item_placement"),
localforage.removeItem("randomizer.dungeon_items"),
localforage.removeItem("randomizer.accessibility"),
localforage.removeItem("randomizer.goal"),
localforage.removeItem("randomizer.tower_open"),
localforage.removeItem("randomizer.ganon_open"),
localforage.removeItem("randomizer.world_state"),
localforage.removeItem("randomizer.hints"),
localforage.removeItem("randomizer.weapons"),
localforage.removeItem("randomizer.item_pool"),
localforage.removeItem("randomizer.item_functionality"),
localforage.removeItem("randomizer.enemy_health"),
localforage.removeItem("randomizer.enemy_damage"),
localforage.removeItem("randomizer.enemy_shuffle"),
localforage.removeItem("randomizer.boss_shuffle"),
this.$store.dispatch("nukeStore")
];
Promise.all(promises).then(() => {
window.location.hash = "";
window.location.reload();
});
}
},
localforage.setItem('historys', this.historys, () => {
localforage.removeItem('history_' + history.key, () => {})
})
}
localforage.removeItem("randomizer.glitches_required"),
localforage.removeItem("randomizer.item_placement"),
localforage.removeItem("randomizer.dungeon_items"),
localforage.removeItem("randomizer.accessibility"),
localforage.removeItem("randomizer.goal"),
localforage.removeItem("randomizer.tower_open"),
localforage.removeItem("randomizer.ganon_open"),
localforage.removeItem("randomizer.world_state"),
localforage.removeItem("randomizer.hints"),
localforage.removeItem("randomizer.weapons"),
localforage.removeItem("randomizer.item_pool"),
localforage.removeItem("randomizer.item_functionality"),
localforage.removeItem("randomizer.enemy_health"),
localforage.removeItem("randomizer.enemy_damage"),
localforage.removeItem("randomizer.enemy_shuffle"),
localforage.removeItem("randomizer.boss_shuffle"),
this.$store.dispatch("nukeStore")
];
Promise.all(promises).then(() => {
window.location.hash = "";
window.location.reload();
});
}
},
static remove(...args) {
const key = args[0]
delete cache[key]
return localforage.removeItem(...args)
}
}
.then(keys => {
if (keys.includes('undefined')) {
localforage.removeItem('undefined')
}
})
.success( () => {
this._user = this._buildUser( adapter );
localforage.setItem( KEYCLOAK_TOKEN_EXPIRES_KEY, adapter.tokenParsed.exp );
this._trigger( 'login', this._user );
this._logout = adapter.logout;
this._loggedIn = true;
localforage
.removeItem( KEYCLOAK_INPROGESS_KEY )
.then( () => {
let event = new HashChangeEvent( 'hashchange' );
event.oldURL = '_oauth';
event.newURL = location.hash;
window.dispatchEvent( event );
resolve( this._user );
} )
.catch( reject );
} )
.error( () => {