diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-07-24 17:34:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-24 17:34:53 -0400 |
commit | e493cbc998eeee5d3c368287e5c5900c4821bc9d (patch) | |
tree | 955e09e9f64116178ec98cfed736434172e0dc75 /ext/fg/js/frontend.js | |
parent | 3754c920410e90fc6b98aadc9f0dbe60dfa6a14d (diff) |
Simplify Popup.showContent API to use only two details arguments (#684)
Diffstat (limited to 'ext/fg/js/frontend.js')
-rw-r--r-- | ext/fg/js/frontend.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js index bd64f1ac..49cf4ca6 100644 --- a/ext/fg/js/frontend.js +++ b/ext/fg/js/frontend.js @@ -432,13 +432,17 @@ class Frontend { } _showPopupContent(textSource, optionsContext, type=null, details=null) { - const context = {optionsContext, source: this._id}; this._lastShowPromise = this._popup.showContent( - textSource.getRect(), - textSource.getWritingMode(), - type, - details, - context + { + source: this._id, + optionsContext, + elementRect: textSource.getRect(), + writingMode: textSource.getWritingMode() + }, + { + type, + details + } ); this._lastShowPromise.catch((error) => { if (yomichan.isExtensionUnloaded) { return; } |