Allow catalog search by a URL fragment (#s=...)
This commit is contained in:
parent
3d2ddb8c3b
commit
6b37abab85
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user