✨ Adapt to new chatgpt
This commit is contained in:
6
src-tauri/src/inject/event.js
vendored
6
src-tauri/src/inject/event.js
vendored
@@ -58,10 +58,6 @@ function externalTargetLink() {
|
|||||||
return ['zbook.lol'].indexOf(location.hostname) > -1;
|
return ['zbook.lol'].indexOf(location.hostname) > -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function externalSelfLink() {
|
|
||||||
return ['chat.openai.com'].indexOf(location.hostname) > -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
const tauri = window.__TAURI__;
|
const tauri = window.__TAURI__;
|
||||||
const appWindow = tauri.window.appWindow;
|
const appWindow = tauri.window.appWindow;
|
||||||
@@ -170,7 +166,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
// case: download from dataURL -> convert dataURL ->
|
// case: download from dataURL -> convert dataURL ->
|
||||||
} else if (url.startsWith('data:')) {
|
} else if (url.startsWith('data:')) {
|
||||||
downloadFromDataUri(url, filename);
|
downloadFromDataUri(url, filename);
|
||||||
} else if (isDownloadLink(url) || externalSelfLink()) {
|
} else if (isDownloadLink(url) || anchorEle.hostname !== window.location.host) {
|
||||||
handleExternalLink(e, url);
|
handleExternalLink(e, url);
|
||||||
}
|
}
|
||||||
}, true);
|
}, true);
|
||||||
|
|||||||
19
src-tauri/src/inject/style.js
vendored
19
src-tauri/src/inject/style.js
vendored
@@ -92,11 +92,20 @@ window.addEventListener('DOMContentLoaded', _event => {
|
|||||||
padding-top: 30px;
|
padding-top: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#__next>div>div>.flex.h-screen.w-full.flex-col.items-center {
|
||||||
|
padding-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
#__next .absolute .px-3.pt-2.pb-3.text-center {
|
#__next .absolute .px-3.pt-2.pb-3.text-center {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
padding-bottom: 4px;
|
padding-bottom: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#__next .h-full.w-full .text-center.text-xs.text-gray-600>span {
|
||||||
|
visibility: hidden;
|
||||||
|
height: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
#__next > div.overflow-hidden.w-full.h-full.relative.flex > div.dark.hidden.flex-shrink-0.bg-gray-900.md\\:flex.md\\:w-\\[260px\\].md\\:flex-col > div > div > nav {
|
#__next > div.overflow-hidden.w-full.h-full.relative.flex > div.dark.hidden.flex-shrink-0.bg-gray-900.md\\:flex.md\\:w-\\[260px\\].md\\:flex-col > div > div > nav {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
@@ -339,21 +348,11 @@ window.addEventListener('DOMContentLoaded', _event => {
|
|||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#__next .overflow-hidden.w-full main.relative.h-full.w-full.flex-1{
|
|
||||||
padding-bottom: 82px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#__next > div.overflow-hidden.w-full.h-full main.relative.h-full.w-full.flex-1 > .flex-1.overflow-hidden .h-32.md\\:h-48.flex-shrink-0{
|
#__next > div.overflow-hidden.w-full.h-full main.relative.h-full.w-full.flex-1 > .flex-1.overflow-hidden .h-32.md\\:h-48.flex-shrink-0{
|
||||||
height: 0px;
|
height: 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width:565px){
|
|
||||||
#__next .overflow-hidden.w-full main.relative.h-full.w-full.flex-1{
|
|
||||||
padding-bottom: 98px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#__next .prose ol li p {
|
#__next .prose ol li p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
display: inline;
|
display: inline;
|
||||||
|
|||||||
Reference in New Issue
Block a user