diff options
Diffstat (limited to 'ext/fg/js/popup.js')
| -rw-r--r-- | ext/fg/js/popup.js | 25 | 
1 files changed, 7 insertions, 18 deletions
| diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js index 2a9670fc..6c24c0ce 100644 --- a/ext/fg/js/popup.js +++ b/ext/fg/js/popup.js @@ -90,6 +90,13 @@ class Popup {          this.updateTheme();      } +    async showContent(elementRect, writingMode, type=null, details=null) { +        if (!this.isInitialized()) { return; } +        await this.show(elementRect, writingMode); +        if (type === null) { return; } +        this.invokeApi('setContent', {type, details}); +    } +      async show(elementRect, writingMode) {          await this.inject(); @@ -218,12 +225,6 @@ class Popup {          return [position, size, after];      } -    async showOrphaned(elementRect, writingMode) { -        if (!this.isInitialized()) { return; } -        await this.show(elementRect, writingMode); -        this.invokeApi('orphaned'); -    } -      hide(changeFocus) {          if (!this.isVisible()) {              return; @@ -320,18 +321,6 @@ class Popup {          return false;      } -    async termsShow(elementRect, writingMode, definitions, context) { -        if (!this.isInitialized()) { return; } -        await this.show(elementRect, writingMode); -        this.invokeApi('termsShow', {definitions, context}); -    } - -    async kanjiShow(elementRect, writingMode, definitions, context) { -        if (!this.isInitialized()) { return; } -        await this.show(elementRect, writingMode); -        this.invokeApi('kanjiShow', {definitions, context}); -    } -      async setCustomCss(css) {          this.invokeApi('setCustomCss', {css});      } |