diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-05-24 13:30:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-24 13:30:40 -0400 |
commit | c61a87b152b91bdebe01eefdbc3fa00670a3071d (patch) | |
tree | 63a94eacdc437da1e166a72a9b4d4794df294f22 /ext/bg/js/search-main.js | |
parent | 83a577fa569e5a6d468e3b304313106bba3e1e49 (diff) |
API refactor (#532)
* Convert api.js into a class instance
* Use new api.* functions
* Fix missing binds
* Group functions with progress callbacks together
* Change style
* Fix API override not working
Diffstat (limited to 'ext/bg/js/search-main.js')
-rw-r--r-- | ext/bg/js/search-main.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/bg/js/search-main.js b/ext/bg/js/search-main.js index 54fa549d..3e089594 100644 --- a/ext/bg/js/search-main.js +++ b/ext/bg/js/search-main.js @@ -17,8 +17,7 @@ /* global * DisplaySearch - * apiForwardLogsToBackend - * apiOptionsGet + * api * dynamicLoader */ @@ -35,7 +34,7 @@ async function injectSearchFrontend() { } (async () => { - apiForwardLogsToBackend(); + api.forwardLogsToBackend(); await yomichan.prepare(); const displaySearch = new DisplaySearch(); @@ -45,7 +44,7 @@ async function injectSearchFrontend() { const applyOptions = async () => { const optionsContext = {depth: 0, url: window.location.href}; - const options = await apiOptionsGet(optionsContext); + const options = await api.optionsGet(optionsContext); if (!options.scanning.enableOnSearchPage || optionsApplied) { return; } optionsApplied = true; |