From 62c5782f66bf6136d313ed98fdd72ba528454a52 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Fri, 26 Mar 2021 15:53:30 -0700 Subject: [PATCH] message-screenshot: Update for removal of navigate global. Commit 0200f48a12ac25e148abf694e21174a90b30992b (#17407) removed the navigate global variable. Use the K hotkey instead of evaluating navigate.up(). Signed-off-by: Anders Kaseorg --- tools/message-screenshot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/message-screenshot.js b/tools/message-screenshot.js index b5939329fc..fab6da185c 100644 --- a/tools/message-screenshot.js +++ b/tools/message-screenshot.js @@ -1,6 +1,6 @@ "use strict"; -/* global $, CSS, navigate */ +/* global $, CSS */ const path = require("path"); @@ -60,8 +60,8 @@ async function run() { // remove unread marker and don't select message const marker = `#zfilt${CSS.escape(options.messageId)} .unread_marker`; await page.evaluate((sel) => $(sel).remove(), marker); - await page.evaluate(() => navigate.up()); const messageBox = await page.$(messageSelector); + await page.keyboard.press("KeyK"); const messageGroup = (await messageBox.$x(".."))[0]; // Compute screenshot area, with some padding around the message group const clip = {...(await messageGroup.boundingBox())};