tianyunperfect 1 سال پیش
والد
کامیت
809eec029f
2فایلهای تغییر یافته به همراه37 افزوده شده و 2 حذف شده
  1. 1 1
      simple-demo/new_note.html
  2. 36 1
      tmp/tmp2.js

+ 1 - 1
simple-demo/new_note.html

@@ -7,7 +7,7 @@
 </head>
 </head>
 <body>
 <body>
 <script>
 <script>
-    let res = requestUtil.sync('https://web_history.tianyunperfect.cn/tri/create_note?title=tmp&content=1', 'get', {})
+    let res = requestUtil.sync('https://web_history.tianyunperfect.cn/tri/create_note?title=tmp&content=', 'get', {})
     let re = res['noteId'];
     let re = res['noteId'];
     let baseUrl = "https://tri.tianyunperfect.cn/#root/";
     let baseUrl = "https://tri.tianyunperfect.cn/#root/";
     let url = baseUrl + re;
     let url = baseUrl + re;

+ 36 - 1
tmp/tmp2.js

@@ -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();
+        }
+    }
+
+})();