From aa2d9666d6fd79519095f9f840a003c063eaafc4 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 30 Jan 2013 03:35:34 +0400 Subject: [PATCH] added reset button... Signed-off-by: Alex A. Naanou --- index.html | 15 ++++++++++++++- magazine.js | 8 ++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 696a567..fe60ed7 100755 --- a/index.html +++ b/index.html @@ -453,7 +453,7 @@ $(document).ready(function(){ } .settings button, .settings input { background: white; - height: 20px; + height: 25px; } .settings input { border: solid silver 1px; @@ -466,6 +466,11 @@ $(document).ready(function(){ padding-left: 15px; padding-right: 15px; } + #RESET { + background: red; + color: white; + font-weight: bold; + } @@ -519,6 +524,14 @@ $(document).ready(function(){ + + + +
+ Reset stored data: + + +

diff --git a/magazine.js b/magazine.js index ef9ff80..7c1f34e 100755 --- a/magazine.js +++ b/magazine.js @@ -779,6 +779,9 @@ function saveStorageState(){ $.jStorage.set('current_page', getPageNumber()) $.jStorage.set('bookmarks', buildBookmarkList()) } +function resetStorageState(){ + $.jStorage.flush() +} // JSON format state managers... @@ -809,6 +812,11 @@ function saveState(){ saveStorageState() } +function resetState(){ + resetStorageState() + loadState() +} + /********************************************************** editor ***/