diff --git a/src/content_script.js b/src/content_script.js index 77e4a75..ae77026 100644 --- a/src/content_script.js +++ b/src/content_script.js @@ -3,9 +3,7 @@ async function init() { clearInterval(window.buttonsInterval); } window.buttonsInterval = setInterval(() => { - const actionsArea = selectElementByClassPrefix( - "PromptTextarea__LastItemActions" - ); + const actionsArea = document.querySelector(".fEGhx"); if (!actionsArea) { return; } @@ -137,12 +135,12 @@ class Elements { this.init(); } init() { - this.threadWrapper = selectElementByClassPrefix("Thread__Wrapper"); - this.spacer = selectElementByClassPrefix("ThreadLayout__BottomSpacer"); - this.thread = selectElementByClassPrefix("ThreadLayout__NodeWrapper"); - this.positionForm = selectElementByClassPrefix("Thread__PositionForm"); - this.styledThread = selectElementByClassPrefix("Thread__StyledThread"); - this.threadContent = selectElementByClassPrefix("Thread__Content"); + this.threadWrapper = document.querySelector(".cdfdFe"); + this.spacer = document.querySelector(".gntWOk"); + this.thread = document.querySelector(".eGLyXw"); + this.positionForm = document.querySelector(".jqdtxi"); + this.styledThread = document.querySelector("main"); + this.threadContent = document.querySelector(".gAnhyd"); this.scroller = Array.from( document.querySelectorAll('[class*="react-scroll-to"]') ).filter((el) => el.classList.contains("h-full"))[0]; diff --git a/src/manifest.json b/src/manifest.json index bfa164a..1f3a4f0 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "ChatGPT Download", "description": "Download a PNG or PDF of your chat with ChatGPT", - "version": "1.1.1", + "version": "1.2.1", "author": "Liad Yosef", "icons": { "48": "icons/48.png"