mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-17 08:31:38 +00:00
minor fix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
70c213f92c
commit
90c58db7fd
10
index.html
10
index.html
@ -37,14 +37,18 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
// clear the localStorage...
|
// clear the localStorage...
|
||||||
var clear = () => {
|
var clearStorage = function(){
|
||||||
delete localStorage['store-persistently']
|
delete localStorage['store-persistently']
|
||||||
delete localStorage['wiki-data']
|
delete localStorage['wiki-data']
|
||||||
delete localStorage['wiki-location']
|
delete localStorage['wiki-location']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var getStorage = function(){
|
||||||
|
return localStorage['store-persistently'] ? localStorage : sessionStorage
|
||||||
|
}
|
||||||
|
|
||||||
var save = () => {
|
var save = () => {
|
||||||
var storage = localStorage['store-persistently'] ? localStorage : sessionStorage
|
var storage = getStorage()
|
||||||
|
|
||||||
// XXX save...
|
// XXX save...
|
||||||
storage['wiki-data'] = JSON.stringify(Wiki.__wiki_data)
|
storage['wiki-data'] = JSON.stringify(Wiki.__wiki_data)
|
||||||
@ -270,7 +274,7 @@ $(() => {
|
|||||||
data = Wiki.__wiki_data = Bootstrap
|
data = Wiki.__wiki_data = Bootstrap
|
||||||
}
|
}
|
||||||
|
|
||||||
var storage = localStorage['store-persistently'] ? localStorage : sessionStorage
|
var storage = getStorage()
|
||||||
|
|
||||||
// load stored data...
|
// load stored data...
|
||||||
Wiki.__wiki_data = storage['wiki-data'] ?
|
Wiki.__wiki_data = storage['wiki-data'] ?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user