aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bog.js9
-rw-r--r--views.js4
2 files changed, 9 insertions, 4 deletions
diff --git a/bog.js b/bog.js
index 6dd2811..17098c4 100644
--- a/bog.js
+++ b/bog.js
@@ -73,7 +73,7 @@ function getName (id) {
// bog.regenerate -- regenerates main log by taking all of the feed logs, combinging them, and then sorting them
-function regenerate () {
+function regenerate (home) {
var newlog = []
var openedlog = []
localforage.iterate(function(value, key, i) {
@@ -96,7 +96,12 @@ function regenerate () {
var reversed = openedlog.reverse()
console.log('REGENERATE')
- localforage.setItem('log', reversed).then(function () {location.reload()})
+ localforage.setItem('log', reversed).then(function () {
+ if (home) {
+ location.hash = ''
+ }
+ location.reload()
+ })
})
}
diff --git a/views.js b/views.js
index 292c154..5b57442 100644
--- a/views.js
+++ b/views.js
@@ -44,8 +44,8 @@ function profilePage (src, keys) {
profile.appendChild(h('button', {
onclick: function () {
localforage.removeItem(src).then(function () {
- location.hash = ''
- regenerate()
+ var home = true
+ regenerate(home)
})
}
}, ['Delete feed']))