diff --git a/index.html b/index.html index 5677a19..280105c 100644 --- a/index.html +++ b/index.html @@ -73,7 +73,7 @@
- + @@ -84,7 +84,7 @@

- + diff --git a/main.js b/main.js index 1bd331c..943e109 100644 --- a/main.js +++ b/main.js @@ -35,6 +35,14 @@ var v = new Vue({ if(spoilers !== null && spoilers !== ""){ this.spoilers = JSON.parse(spoilers); } + hideCompleted = localStorage.getItem('hideCompleted'); + if(hideCompleted !== null && hideCompleted !== ""){ + this.hideCompleted = hideCompleted; + } + hideSpoilers = localStorage.getItem('hideSpoilers'); + if(hideSpoilers !== null && hideSpoilers !== ""){ + this.hideSpoilers = hideSpoilers; + } }, computed: { user_data_serialized: function(){ @@ -105,6 +113,14 @@ var v = new Vue({ change_skill: function(new_skill){ this.active_skill = new_skill; }, + toggleHideCompleted: function(){ + this.hideCompleted = !this.hideCompleted; + localStorage.setItem('hideCompleted', this.hideCompleted); + }, + toggleHideSpoilers: function(){ + this.hideSpoilers = !this.hideSpoilers; + localStorage.setItem('hideSpoilers', this.hideSpoilers); + }, addItemToBundle: function(bundleId, itemId, itemPosition){ this.user_data[bundleId].push({item: itemId, position: itemPosition}); },