Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Bug #1184

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions scripts/export.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ async function exportInit() {
this.init();
}
init() {
this.spacer = document.querySelector("main div[class*='h-'].flex-shrink-0");
this.thread = document.querySelector(
"[class*='react-scroll-to-bottom']>[class*='react-scroll-to-bottom']>div",
);
Expand Down Expand Up @@ -140,7 +139,6 @@ async function exportInit() {
this.hiddens.forEach((el) => {
el.classList.remove('overflow-hidden');
});
this.spacer.style.display = 'none';
this.thread.style.maxWidth = '960px';
this.thread.style.marginInline = 'auto';
this.positionForm.style.display = 'none';
Expand All @@ -167,7 +165,6 @@ async function exportInit() {
this.hiddens.forEach((el) => {
el.classList.add('overflow-hidden');
});
this.spacer.style.display = null;
this.thread.style.maxWidth = null;
this.thread.style.marginInline = null;
this.positionForm.style.display = null;
Expand Down Expand Up @@ -208,12 +205,13 @@ async function exportInit() {

function btnInit() {
const intervalId = setInterval(function () {
const navActionArea = document.querySelector('nav .border-t > div');
const navActionArea = document.querySelector('nav .flex.flex-col.pt-2');
const addArea = document.querySelector('#chatgpt-nav-action-area');
if (!navActionArea || addArea) return;
const cloneNode = document.createElement('div');
cloneNode.id = 'chatgpt-nav-action-area';
cloneNode.classList = `${navActionArea.className} border-b border-white/20 mb-2 pb-2`;
cloneNode.style.flexDirection = 'row'; // Override flex-direction
cloneNode.appendChild(addBtn('png'));
cloneNode.appendChild(addBtn('pdf'));
cloneNode.appendChild(addBtn('md'));
Expand Down