From 3908fcdb90524614074e040766f626d28e73c892 Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Sun, 5 May 2024 21:12:35 +0800 Subject: [PATCH] remove container on resultts page --- scripts/pages/popup.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/pages/popup.js b/scripts/pages/popup.js index ea43630..dd43510 100644 --- a/scripts/pages/popup.js +++ b/scripts/pages/popup.js @@ -79,12 +79,19 @@ class Page_Popup extends Page { this.elements[`frame`].forEach((frame) => { frame.src = PAGE; }) + + // The results page has its own container. + this.elements[`container`].forEach((CONTAINER) => { + console.log(PAGE.includes("results.htm")); + CONTAINER.classList[(PAGE.includes(`results`)) ? `remove` : `add`](`container`); + }); }; }; async content() { this.elements = {}; - this.elements[`frame`] = document.querySelectorAll(`iframe.viewer`); + this.elements[`container`] = document.querySelectorAll(`main`); + this.elements[`frame`] = document.querySelectorAll(`main > iframe.viewer`); // Check if the frame is available.