Greasy Fork is available in English.
网页版kimi删除历史消息时,按下Option键代替模拟鼠标点击确认删除,方便快捷..
当前为
// ==UserScript==
// @name kimi快速删除历史消息(按Option键模拟鼠标点击确认删除)
// @namespace Violentmonkey Scripts
// @match https://kimi.moonshot.cn/*
// @license MIT
// @grant none
// @version 1.3
// @author -
// @description 网页版kimi删除历史消息时,按下Option键代替模拟鼠标点击确认删除,方便快捷..
// ==/UserScript==
(function() {
'use strict';
window.onload = function() {
// 监听键盘事件
document.addEventListener('keydown', function(event) {
// 检查是否按下了 Option 键
if (event.altKey) { // 这里改为检查Option键
event.preventDefault(); // 阻止默认的滚动行为
// 查找所有类名为 kimi-button danger 的按钮
var deleteButtons = document.querySelectorAll('.kimi-button.danger');
// 如果找到了删除按钮,则模拟点击第一个找到的按钮
if (deleteButtons.length > 0) {
deleteButtons[0].click();
}
}
});
};
})();