From 32ac937b88cbfa8174457963db70de8a6e81e62c Mon Sep 17 00:00:00 2001 From: Netanel Henya Date: Thu, 20 Jun 2024 20:39:41 +0300 Subject: [PATCH] fix(content.js): updated the js selection to correctly select the new query according to hte new page layout. --- extension/src/content.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extension/src/content.js b/extension/src/content.js index df79b30..977793c 100644 --- a/extension/src/content.js +++ b/extension/src/content.js @@ -4,10 +4,10 @@ const getImdbID = () => { }; const getQuery = () => { - const header = document.getElementById("featured-film-header"); - const title = header?.querySelector("h1")?.innerText; - const year = header?.querySelector("p > small > a")?.innerText; - return `${title} ${year || ""}`; + const details = document.querySelector(".details") + const title = details?.querySelector("h1")?.innerText; + const year = details?.querySelector(".releaseyear > a")?.innerText; + return `${title ?? ""} ${year ?? ""}`; }; const getFilmData = () => {