diff options
author | siikamiika <siikamiika@users.noreply.github.com> | 2020-04-26 22:33:50 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-26 22:33:50 +0300 |
commit | ca033a87a0d302151b430acfdf9d480514c14aed (patch) | |
tree | ebb783c7bd371a6859c25009a57799d70ac73bac /ext/bg/js/search.js | |
parent | a49e4ccc4e5c7defb30bd88535c18137acf9812c (diff) |
Update Popup and DisplayFloat optionsContext from Frontend (#464)
* set optionsContext from Frontend
* update Popup+Display options on Frontend change
* remove popup setOptions
* only update DisplayFloat options from Frontend
* fix optionsContext usage
* fix preview frame arguments
* keep Frontend URL up to date
* cache url
* fix preview frame
* trigger modifyingProfileChange in correct places
* remove async from function not using await
* refactor optionsContext in Frontend
Diffstat (limited to 'ext/bg/js/search.js')
-rw-r--r-- | ext/bg/js/search.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js index 684ea6d3..a5484fc3 100644 --- a/ext/bg/js/search.js +++ b/ext/bg/js/search.js @@ -76,6 +76,8 @@ class DisplaySearch extends Display { async prepare() { try { await super.prepare(); + await this.updateOptions(); + yomichan.on('optionsUpdated', () => this.updateOptions()); await this.queryParser.prepare(); const {queryParams: {query='', mode=''}} = parseUrl(window.location.href); @@ -231,7 +233,7 @@ class DisplaySearch extends Display { this.setIntroVisible(!valid, animate); this.updateSearchButton(); if (valid) { - const {definitions} = await apiTermsFind(query, details, this.optionsContext); + const {definitions} = await apiTermsFind(query, details, this.getOptionsContext()); this.setContent('terms', {definitions, context: { focus: false, disableHistory: true, |