summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/catalog-search.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/js/catalog-search.js b/js/catalog-search.js
index b91fc1ea..3235d1dc 100644
--- a/js/catalog-search.js
+++ b/js/catalog-search.js
@@ -26,9 +26,14 @@ var catalogSearch = function() {
$threads.hide();
$found.show();
});
+
+ var m = location.hash.match(/[#&]s=([^&]+)/);
+ if(m) {
+ $searchBox.val(decodeURIComponent(m[1])).keyup();
+ }
};
-// Filter threads by their content, given a regex. Can be extended later to load data
+// Filter threads by their content, given a regex. Can be extended to load data
// remotely and filter by multiple fields
var searchThreads = function($threads, query) {
var re = new RegExp(query, 'mi');