diff options
Diffstat (limited to 'app/src/main/assets/js')
-rw-r--r-- | app/src/main/assets/js/search.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/src/main/assets/js/search.js b/app/src/main/assets/js/search.js index 3d10e6f5..d3b319d4 100644 --- a/app/src/main/assets/js/search.js +++ b/app/src/main/assets/js/search.js @@ -1,10 +1,13 @@ //binds callbacks to an invisible webview to take in the search events console.log('Binding Search'); -var page = document.querySelector('#page'); +var _f_page = document.querySelector('#page'); +var _f_input = document.querySelector('#main-search-input') +if (!_f_page || !_f_input) return Frost.emit(1); +Frost.emit(0); var x = new MutationObserver(function(mutations) { Frost.handleHtml(page.innerHTML); }); -x.observe(page, { +x.observe(_f_page, { childList: true, subtree: true }); |