Skip to content

Commit

Permalink
修复openai官方bug:侧边栏历史聊天过多导致点击历史会向右抖动的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xcanwin authored May 23, 2023
1 parent bd58ee4 commit d9938fd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions KeepChatGPT.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name KeepChatGPT
// @description 这是一个ChatGPT的畅聊与增强插件。开源免费。不仅能解决所有报错不再刷新,还有保持活跃、取消审计、克隆对话、净化首页、展示大屏、展示全屏、言无不尽、拦截跟踪、日新月异等多个高级功能。让我们的AI体验无比顺畅、丝滑、高效、简洁。解决的报错如下: (1) NetworkError when attempting to fetch resource. (2) Something went wrong. If this issue persists please contact us through our help center at help.openai.com. (3) Conversation not found. (4) This content may violate our content policy.
// @version 14.0
// @version 14.1
// @author xcanwin
// @namespace https://github.com/xcanwin/KeepChatGPT/
// @supportURL https://github.com/xcanwin/KeepChatGPT/
Expand Down Expand Up @@ -755,7 +755,7 @@ nav {
line-height: 1;
}
nav.flex div.overflow-y-auto a.hover\\:pr-4 {
padding-right: unset !important;
padding-right: unset;
}
#nmenuid_ap {
Expand Down Expand Up @@ -836,6 +836,12 @@ nav.flex div.overflow-y-auto a.hover\\:pr-4 {
$$(`nav.flex div.overflow-y-auto h3`).forEach(el => {
el.remove();
});
const sidebar_chat = $("nav.flex div.overflow-y-auto");
if (sidebar_chat.scrollHeight > sidebar_chat.clientHeight) {
sidebar_chat.classList.add("-mr-2");
} else {
sidebar_chat.classList.remove("-mr-2");
}
};

const verInt = function(vs) {
Expand Down

0 comments on commit d9938fd

Please sign in to comment.