aboutsummaryrefslogtreecommitdiff
path: root/static/search_facade.js
diff options
context:
space:
mode:
authorJieiku2022-07-31 21:48:43 -0700
committerJieiku2022-07-31 21:48:43 -0700
commitcf95ee520261a0a523d5a3dfbc01a3847d67de51 (patch)
tree8d5310a5c0ebc57dbe02cf3f1d6d0d223a9929da /static/search_facade.js
parent0e57376f244848c6513236424dffb63acd15271c (diff)
downloadabridge-cf95ee520261a0a523d5a3dfbc01a3847d67de51.tar.gz
abridge-cf95ee520261a0a523d5a3dfbc01a3847d67de51.tar.bz2
abridge-cf95ee520261a0a523d5a3dfbc01a3847d67de51.zip
Dynamically Load Search
Diffstat (limited to 'static/search_facade.js')
-rw-r--r--static/search_facade.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/static/search_facade.js b/static/search_facade.js
new file mode 100644
index 0000000..c18d3f9
--- /dev/null
+++ b/static/search_facade.js
@@ -0,0 +1,12 @@
+var sha256='b00061ff14234bb637b048af272163401458e658b12d3a7d440fff38f54d309c';
+var sha384='S1U+nC05HTi/o4S13KbBlxk4d4/HoWRXeZmGy8QPTLs1SM5QjdDaxUsyBEvG850D';
+function loadSearchNow() {
+ var loadSearch = document.createElement('script');
+ loadSearch.src = '/search_bundle.min.js?h=' + sha256;
+ loadSearch.setAttribute('integrity', 'sha384-' + sha384);
+ document.head.appendChild(loadSearch);
+ document.getElementById('userinput').onclick = '';
+}
+window.onload = function() {
+ document.getElementById('userinput').onclick = function() { return loadSearchNow() }
+}; \ No newline at end of file