aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js/search.js
blob: 5f0f0e0aae7d9bac1357e90e0b201ced3484632c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//binds callbacks to an invisible webview to take in the search events
console.log('Binding Search');
var _f_page = document.querySelector('#page');
// var _f_input = document.querySelector('#main-search-input')
if (!_f_page) Frost.emit(1);
// else {
  Frost.emit(0);
  var x = new MutationObserver(function(mutations) {
    Frost.handleHtml(page.innerHTML);
    Frost.emit(2);
  });
  x.observe(_f_page, {
    childList: true,
    subtree: true
  });
// }