aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/popup-preview-frame.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/settings/popup-preview-frame.js')
-rw-r--r--ext/bg/js/settings/popup-preview-frame.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/ext/bg/js/settings/popup-preview-frame.js b/ext/bg/js/settings/popup-preview-frame.js
index 8901a0c4..bd9357e9 100644
--- a/ext/bg/js/settings/popup-preview-frame.js
+++ b/ext/bg/js/settings/popup-preview-frame.js
@@ -20,14 +20,13 @@
* Popup
* PopupFactory
* TextSourceRange
- * apiFrameInformationGet
- * apiOptionsGet
+ * api
*/
class SettingsPopupPreview {
constructor() {
this.frontend = null;
- this.apiOptionsGetOld = apiOptionsGet;
+ this.apiOptionsGetOld = api.optionsGet.bind(api);
this.popup = null;
this.popupSetCustomOuterCssOld = null;
this.popupShown = false;
@@ -54,10 +53,10 @@ class SettingsPopupPreview {
document.querySelector('#theme-dark-checkbox').addEventListener('change', this.onThemeDarkCheckboxChanged.bind(this), false);
// Overwrite API functions
- window.apiOptionsGet = this.apiOptionsGet.bind(this);
+ api.optionsGet = this.apiOptionsGet.bind(this);
// Overwrite frontend
- const {frameId} = await apiFrameInformationGet();
+ const {frameId} = await api.frameInformationGet();
const popupFactory = new PopupFactory(frameId);
await popupFactory.prepare();