Skip to content

Commit

Permalink
fix: adapt to classname change
Browse files Browse the repository at this point in the history
  • Loading branch information
liady committed Dec 5, 2022
1 parent 8611251 commit a0d9c1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions src/content_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit a0d9c1d

Please sign in to comment.