aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed/js/display.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mixed/js/display.js')
-rw-r--r--ext/mixed/js/display.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js
index 5c010747..400a83c0 100644
--- a/ext/mixed/js/display.js
+++ b/ext/mixed/js/display.js
@@ -707,7 +707,7 @@ class Display {
async getScreenshot() {
try {
await this.setPopupVisibleOverride(false);
- await Display.delay(1); // Wait for popup to be hidden.
+ await promiseTimeout(1); // Wait for popup to be hidden.
const {format, quality} = this.options.anki.screenshot;
const dataUrl = await apiScreenshotGet({format, quality});
@@ -784,10 +784,6 @@ class Display {
}
}
- static delay(time) {
- return new Promise((resolve) => setTimeout(resolve, time));
- }
-
static indexOf(nodeList, node) {
for (let i = 0, ii = nodeList.length; i < ii; ++i) {
if (nodeList[i] === node) {