aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/assets/js/search.min.js
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-06 19:26:38 -0400
committerGitHub <noreply@github.com>2017-07-06 19:26:38 -0400
commitbb70ed737d98abbd6164b66ac5bd667553b312bd (patch)
tree1899d7adefe3fbf67e6fd26a4da0837898bd6d7a /app/src/main/assets/js/search.min.js
parent2586e947f769740dd8cb8bf8b1dd0473b51e50e4 (diff)
downloadfrost-bb70ed737d98abbd6164b66ac5bd667553b312bd.tar.gz
frost-bb70ed737d98abbd6164b66ac5bd667553b312bd.tar.bz2
frost-bb70ed737d98abbd6164b66ac5bd667553b312bd.zip
Dev 1.1.5 - JS fixes & sharing intents (#32)v1.1.5
* Add sharing intents * Fix up multiple js instances
Diffstat (limited to 'app/src/main/assets/js/search.min.js')
-rw-r--r--app/src/main/assets/js/search.min.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/app/src/main/assets/js/search.min.js b/app/src/main/assets/js/search.min.js
index c5e577d1..109bfb13 100644
--- a/app/src/main/assets/js/search.min.js
+++ b/app/src/main/assets/js/search.min.js
@@ -1,14 +1,15 @@
-console.log("Binding Search")
-
+if(!window.hasOwnProperty("frost_search")){
+console.log("Registering frost_search"),
+window.frost_search=!0
;var _f_page=document.querySelector("#page")
-
-;_f_page||Frost.emit(1),Frost.emit(0)
-
+;if(_f_page){
+Frost.emit(0)
;var x=new MutationObserver(function(e){
Frost.handleHtml(page.innerHTML),Frost.emit(2)
})
-
;x.observe(_f_page,{
childList:!0,
subtree:!0
-}); \ No newline at end of file
+})
+}else Frost.emit(1)
+} \ No newline at end of file