diff --git a/chatgpt/chatgpt-enhance/chatgpt-enhance.js b/chatgpt/chatgpt-enhance/chatgpt-enhance.js index 3bb393e..911ea88 100644 --- a/chatgpt/chatgpt-enhance/chatgpt-enhance.js +++ b/chatgpt/chatgpt-enhance/chatgpt-enhance.js @@ -19,7 +19,7 @@ // @namespace Violentmonkey Scripts // @match *://chat.openai.com/* // @match *://chatgpt.com/* -// @version XiaoYing_2024.08.04.4 +// @version XiaoYing_2024.08.04.6 // @grant GM_info // @grant GM_getValue // @grant GM_setValue @@ -79,15 +79,28 @@ var clearButtonSvg = ' { - let li = that.parents('li'); - let a = li.find('a'); - let href = a.attr('href'); - let id = href.replace('/c/', ''); - $.ajax({ - type: 'PATCH', - url: '/backend-api/conversation/' + id, - headers: { Accept: 'application/json', 'Content-Type': 'application/json', Authorization: `Bearer ${globalVariable.get('accessToken')}` }, - data: JSON.stringify({ is_visible: false }), - success: () => { - location.href = '/'; - } - }); + await deleteItem(id); }); } resolve();