From 691675bdc271e5bb8734463045e4007e203e4a5a Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Thu, 5 Nov 2020 23:56:41 +0100 Subject: [PATCH] Awaitable responses to injectCss (& the rest of the gang) --- src/ext/lib/video-data/PageInfo.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ext/lib/video-data/PageInfo.js b/src/ext/lib/video-data/PageInfo.js index f34306b..d84df85 100644 --- a/src/ext/lib/video-data/PageInfo.js +++ b/src/ext/lib/video-data/PageInfo.js @@ -58,22 +58,22 @@ class PageInfo { this.currentZoomScale = 1; } - injectCss(cssString) { - this.comms.sendMessage({ + async injectCss(cssString) { + await this.comms.sendMessage({ cmd: 'inject-css', cssString: cssString }); } - ejectCss(cssString) { - this.comms.sendMessage({ + async ejectCss(cssString) { + await this.comms.sendMessage({ cmd: 'eject-css', cssString: cssString }); } - replaceCss(oldCssString, newCssString) { - this.comms.sendMessage({ + async replaceCss(oldCssString, newCssString) { + await this.comms.sendMessage({ cmd: 'replace-css', newCssString, oldCssString