|
@@ -1 +1,36 @@
|
|
-123
|
|
|
|
|
|
+// ==UserScript==
|
|
|
|
+// @name T-askai-清空对话
|
|
|
|
+// @namespace http://tampermonkey.net/
|
|
|
|
+// @version 0.1
|
|
|
|
+// @description try to take over the world!
|
|
|
|
+// @require https://web.tianyunperfect.cn/simple/js/util.js
|
|
|
|
+// @author You
|
|
|
|
+// @match https://askchat.ai/*
|
|
|
|
+// @icon https://www.google.com/s2/favicons?sz=64&domain=askchat.ai
|
|
|
|
+// ==/UserScript==
|
|
|
|
+
|
|
|
|
+(async () => {
|
|
|
|
+ 'use strict';
|
|
|
|
+
|
|
|
|
+ // Your code here...
|
|
|
|
+ unsafeWindow.confirm = () => {
|
|
|
|
+ return 1
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ console.log("T-askai-清空对话");
|
|
|
|
+ // 查找id以chat开头的a标签
|
|
|
|
+ let a = await getDom("a[id^='chat']");
|
|
|
|
+ console.log(a);
|
|
|
|
+ // 点击a标签
|
|
|
|
+ if (a) {
|
|
|
|
+ // 在a里查找onclick 以del开头的btn
|
|
|
|
+ let btn = a.querySelector("button[onclick^='del']");
|
|
|
|
+ console.log(btn);
|
|
|
|
+ if (btn) {
|
|
|
|
+ // 点击btn
|
|
|
|
+ btn.click();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+})();
|