Skip to content

Commit a0d9c1d

Browse files
committed
fix: adapt to classname change
1 parent 8611251 commit a0d9c1d

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

src/content_script.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ async function init() {
33
clearInterval(window.buttonsInterval);
44
}
55
window.buttonsInterval = setInterval(() => {
6-
const actionsArea = selectElementByClassPrefix(
7-
"PromptTextarea__LastItemActions"
8-
);
6+
const actionsArea = document.querySelector(".fEGhx");
97
if (!actionsArea) {
108
return;
119
}
@@ -137,12 +135,12 @@ class Elements {
137135
this.init();
138136
}
139137
init() {
140-
this.threadWrapper = selectElementByClassPrefix("Thread__Wrapper");
141-
this.spacer = selectElementByClassPrefix("ThreadLayout__BottomSpacer");
142-
this.thread = selectElementByClassPrefix("ThreadLayout__NodeWrapper");
143-
this.positionForm = selectElementByClassPrefix("Thread__PositionForm");
144-
this.styledThread = selectElementByClassPrefix("Thread__StyledThread");
145-
this.threadContent = selectElementByClassPrefix("Thread__Content");
138+
this.threadWrapper = document.querySelector(".cdfdFe");
139+
this.spacer = document.querySelector(".gntWOk");
140+
this.thread = document.querySelector(".eGLyXw");
141+
this.positionForm = document.querySelector(".jqdtxi");
142+
this.styledThread = document.querySelector("main");
143+
this.threadContent = document.querySelector(".gAnhyd");
146144
this.scroller = Array.from(
147145
document.querySelectorAll('[class*="react-scroll-to"]')
148146
).filter((el) => el.classList.contains("h-full"))[0];

src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 3,
33
"name": "ChatGPT Download",
44
"description": "Download a PNG or PDF of your chat with ChatGPT",
5-
"version": "1.1.1",
5+
"version": "1.2.1",
66
"author": "Liad Yosef",
77
"icons": {
88
"48": "icons/48.png"

0 commit comments

Comments
 (0)