This commit is contained in:
Julian Lam
2014-11-24 12:48:21 -05:00
parent 1c21ca78dc
commit 1b526026a0
4 changed files with 17 additions and 9 deletions

View File

@@ -488,14 +488,16 @@ var socket,
});
Mousetrap.bind('ctrl+f', function(e) {
// If in topic, open search window and populate, otherwise regular behaviour
var match = ajaxify.currentPage.match(/^topic\/([\d]+)/),
tid;
if (match) {
e.preventDefault();
tid = match[1];
searchInput.val('in:topic-' + tid + ' ');
prepareSearch();
if (config.topicSearchEnabled) {
// If in topic, open search window and populate, otherwise regular behaviour
var match = ajaxify.currentPage.match(/^topic\/([\d]+)/),
tid;
if (match) {
e.preventDefault();
tid = match[1];
searchInput.val('in:topic-' + tid + ' ');
prepareSearch();
}
}
});
});