about summary refs log tree commit diff stats
path: root/offline.html
diff options
context:
space:
mode:
authorAndrew Dolgov <noreply@fakecake.org>2017-02-28 09:17:27 +0300
committerAndrew Dolgov <noreply@fakecake.org>2017-02-28 09:17:27 +0300
commit27ef6e89501371b58b92a3b805ab31ba8fc79260 (patch)
treefea8f3daece8b5e30218497362051cae79fda456 /offline.html
parent16d52ac49f7318620d3a84e172cf18917d70de1b (diff)
downloadthe-epube-27ef6e89501371b58b92a3b805ab31ba8fc79260.tar.gz
the-epube-27ef6e89501371b58b92a3b805ab31ba8fc79260.tar.xz
fix .urlParam(); make offline search/reset work similarly to online version
Diffstat (limited to 'offline.html')
-rw-r--r--offline.html12
1 files changed, 7 insertions, 5 deletions
diff --git a/offline.html b/offline.html
index 0062518..d3fa1d5 100644
--- a/offline.html
+++ b/offline.html
@@ -45,7 +45,7 @@
 			<button type="submit" onclick="offline_clear()" class="btn btn-danger">Remove all</button>
 		</form>
 
-		<form onsubmit="return offline_search(this)" class="navbar-form navbar-right">
+		<form class="navbar-form navbar-right">
 			<input type="text" class="form-control search_query" name="query" class="form-control"
 				value="">
 			<button type="submit" class="btn btn-default">Search</button>
@@ -67,12 +67,14 @@
 				});
 		}
 
-		localforage.getItem("epube.search-query").then(function(query) {
+		var query = $.urlParam("query");
 
-			if (query) $(".search_query").val(query);
+		console.log(query);
 
-			populate_list();
-		});
+		if (query)
+			$(".search_query").val(query);
+
+		populate_list();
 
 	});
 </script>