Learn AI

对learn AI进行了加强,我真的想玩AI!

  1. // ==UserScript==
  2. // @name Learn AI
  3. // @namespace https://chat.cutterman.cn/
  4. // @version 0.2
  5. // @description 对learn AI进行了加强,我真的想玩AI!
  6. // @author You
  7. // @match https://chat.cutterman.cn/
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=https://chat.cutterman.cn/
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. // Your code here...
  17. const jquery= document.createElement('script');
  18. jquery.src = 'https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.min.js';
  19. const head = document.getElementsByTagName('head')[0];
  20. head.appendChild(jquery);
  21. function refresh(){
  22. let token = "";
  23. $.ajax({
  24. type : "POST",
  25. url: "https://www.cutterman.cn/chat/user-info",
  26. data: "",
  27. success: function(res) {
  28. //localStorage.setItem("access_token",res.access_token);
  29. token = res.access_token
  30. },
  31. });
  32. const { fetch: originalFetch } = window;
  33. window.fetch = async (...args) => {
  34. let [resource, config] = args;
  35. config.headers['Authorization'] = token
  36. const response = await originalFetch(resource, config);
  37.  
  38. // response interceptor
  39.  
  40. return response;
  41. };
  42. }
  43.  
  44. let count = 0;
  45. window.onkeydown = function(e){
  46. if(e.keyCode === 13) {
  47. count +=1;
  48. if (count >= 2){
  49. //setTimeout(refresh(),100);
  50. refresh()
  51. count = 0;
  52. }
  53. }
  54. }
  55.  
  56. window.onclick = function (e){
  57. let sendButton = e.view.document.getElementsByClassName("text-5 mx-3").item(0);
  58. sendButton.addEventListener("click", ()=>{
  59. count +=1;
  60. if (count >= 2){
  61. //setTimeout(refresh(),100);
  62. refresh()
  63. count = 0;
  64. }
  65. })
  66. }
  67.  
  68.  
  69.  
  70. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址