diff options
| author | Jieiku | 2022-08-23 13:41:41 -0700 |
|---|---|---|
| committer | Jieiku | 2022-08-23 13:41:41 -0700 |
| commit | c7b914505b6505b013610cc71e3b50d68c4a5473 (patch) | |
| tree | d2abebfa75cedd1b7351b51f9d5c909834e8d05d /static/search_facade_stork.js | |
| parent | 6e6c0cbbb5d6136788d35ee5a354d36079c3475a (diff) | |
| download | abridge-c7b914505b6505b013610cc71e3b50d68c4a5473.tar.gz abridge-c7b914505b6505b013610cc71e3b50d68c4a5473.tar.bz2 abridge-c7b914505b6505b013610cc71e3b50d68c4a5473.zip | |
Optimizations, Update Readme YellowLabTools
Diffstat (limited to 'static/search_facade_stork.js')
| -rw-r--r-- | static/search_facade_stork.js | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/static/search_facade_stork.js b/static/search_facade_stork.js index 22e81fd..fc1459d 100644 --- a/static/search_facade_stork.js +++ b/static/search_facade_stork.js @@ -1,17 +1,16 @@ -var baseUrl = document.querySelector("meta[name='base']").getAttribute("content"); -if (baseUrl.slice(-1) == "/") { - baseUrl = baseUrl.slice(0, -1); -} -var sha256='68af89cfa05d9c51e17c945e6618c3a4774d1fac04f5e7cb64cbad320434df6b'; -var sha384='Ajv5IIpSqbhU7cpXEKLoVY5X8Tgp5xoOE36zyqjRgK5uyw6d9X5b05K7l4pMsZG0'; -function loadSearchNow() { - var loadSearch = document.createElement('script'); - loadSearch.src = baseUrl + '/search_bundle_stork.min.js?h=' + sha256; - loadSearch.setAttribute('integrity', 'sha384-' + sha384); - loadSearch.setAttribute('type', 'module'); - document.head.appendChild(loadSearch); - document.getElementById('searchinput').onclick = ''; -} window.onload = function() { - document.getElementById('searchinput').onclick = function() { return loadSearchNow() } + document.getElementById('searchinput').onclick = function() { + var baseUrl = document.querySelector("meta[name='base']").getAttribute("content"); + if (baseUrl.slice(-1) == "/") { + baseUrl = baseUrl.slice(0, -1); + } + var sha256='07a791ddc469ec9b7e93fa64a81899b6c12bb3143e8bd0d1aee0b6dacc885b7e'; + var sha384='ePgzx2d0I+A6dkB+OTuOp13dsBEsL9f847ocaay/uDpwIyj0DUwOm7sEB01VpEiL'; + var loadSearch = document.createElement('script'); + loadSearch.src = baseUrl + '/search_bundle_stork.min.js?h=' + sha256; + loadSearch.setAttribute('integrity', 'sha384-' + sha384); + loadSearch.setAttribute('type', 'module'); + document.head.appendChild(loadSearch); + document.getElementById('searchinput').onclick = ''; + } }; |
