MCPcopy Create free account
hub / github.com/NsLearning/LangHelper / init

Method init

ChatGPT/src-tauri/src/scripts/export.js:221–248  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

219 this.init();
220 }
221 init() {
222 // this.threadWrapper = document.querySelector(".cdfdFe");
223 this.spacer = document.querySelector("[class*='h-48'].w-full.flex-shrink-0");
224 this.thread = document.querySelector(
225 "[class*='react-scroll-to-bottom']>[class*='react-scroll-to-bottom']>div"
226 );
227
228 // fix: old chat https://github.com/lencx/ChatGPT/issues/185
229 if (!this.thread) {
230 this.thread = document.querySelector("main .overflow-y-auto");
231 }
232
233 // h-full overflow-y-auto
234 this.positionForm = document.querySelector("form").parentNode;
235 // this.styledThread = document.querySelector("main");
236 // this.threadContent = document.querySelector(".gAnhyd");
237 this.scroller = Array.from(
238 document.querySelectorAll('[class*="react-scroll-to"]')
239 ).filter((el) => el.classList.contains("h-full"))[0];
240
241 // fix: old chat
242 if (!this.scroller) {
243 this.scroller = document.querySelector('main .overflow-y-auto');
244 }
245
246 this.hiddens = Array.from(document.querySelectorAll(".overflow-hidden"));
247 this.images = Array.from(document.querySelectorAll("img[srcset]"));
248 }
249 fixLocation() {
250 this.hiddens.forEach((el) => {
251 el.classList.remove("overflow-hidden");

Callers 1

constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected