Skip to content

Commit

Permalink
fix(content.js): updated the js selection to correctly select the new
Browse files Browse the repository at this point in the history
query according to hte new page layout.
  • Loading branch information
pypp committed Jun 20, 2024
1 parent 15c4dab commit 32ac937
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions extension/src/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down

0 comments on commit 32ac937

Please sign in to comment.