aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-26 13:31:37 -0700
committerAllan Wang <me@allanwang.ca>2017-06-26 13:31:37 -0700
commita95107d0d10583bfd95495bdc84cc23022b56000 (patch)
treea0edc41817b8ffe0183731a05f330b582435aacc /app/src/main/assets/js
parentc4f936a8a43692cca387f00a25cd70bcad2764f2 (diff)
downloadfrost-a95107d0d10583bfd95495bdc84cc23022b56000.tar.gz
frost-a95107d0d10583bfd95495bdc84cc23022b56000.tar.bz2
frost-a95107d0d10583bfd95495bdc84cc23022b56000.zip
Update dependencies
Diffstat (limited to 'app/src/main/assets/js')
-rw-r--r--app/src/main/assets/js/search.js23
-rw-r--r--app/src/main/assets/js/search.min.js10
2 files changed, 20 insertions, 13 deletions
diff --git a/app/src/main/assets/js/search.js b/app/src/main/assets/js/search.js
index d3b319d4..5f0f0e0a 100644
--- a/app/src/main/assets/js/search.js
+++ b/app/src/main/assets/js/search.js
@@ -1,13 +1,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 || !_f_input) return Frost.emit(1);
-Frost.emit(0);
-var x = new MutationObserver(function(mutations) {
- Frost.handleHtml(page.innerHTML);
-});
-x.observe(_f_page, {
- childList: true,
- subtree: true
-});
+// 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
+ });
+// }
diff --git a/app/src/main/assets/js/search.min.js b/app/src/main/assets/js/search.min.js
index fe93d004..c5e577d1 100644
--- a/app/src/main/assets/js/search.min.js
+++ b/app/src/main/assets/js/search.min.js
@@ -1,10 +1,14 @@
console.log("Binding Search")
-;var page=document.querySelector("#page"),x=new MutationObserver(function(e){
-Frost.handleHtml(page.innerHTML)
+;var _f_page=document.querySelector("#page")
+
+;_f_page||Frost.emit(1),Frost.emit(0)
+
+;var x=new MutationObserver(function(e){
+Frost.handleHtml(page.innerHTML),Frost.emit(2)
})
-;x.observe(page,{
+;x.observe(_f_page,{
childList:!0,
subtree:!0
}); \ No newline at end of file