openAI已就绪,请输入你的问题
// ==UserScript== // @name chatGPT tools Plus(修改版) // @namespace http://tampermonkey.net/ // @version 1.1.5 // @description Google、必应、百度、Yandex、360搜索、谷歌镜像、Fsou侧边栏Chat搜索,即刻体验AI,无需翻墙,无需注册,无需等待! // @author 夜雨 // @match https://cn.bing.com/* // @match https://www.bing.com/* // @match https://chat.openai.com/chat // @match https://www.google.com/* // @match https://www.so.com/s* // @match http*://www.baidu.com/s* // @match https://www.baidu.com* // @match https://m.baidu.com/* // @match http*://yandex.ru/search* // @match http*://yandex.com/search* // @match https://search.ecnu.cf/search* // @match https://search.aust.cf/search* // @match https://search.*.cf/search* // @match https://fsoufsou.com/search* // @match https://www.google.com.hk/* // @include /^https:\/\/www\.baidu\.com\/s\?wd.*$/ // @icon https://www.google.com/s2/favicons?sz=64&domain=openai.com // @grant GM_xmlhttpRequest // @grant GM_addStyle // @run-at document-end // @require https://cdn.staticfile.org/jquery/3.4.0/jquery.min.js // @require https://cdn.staticfile.org/jquery-cookie/1.4.1/jquery.cookie.min.js // @require https://cdn.jsdelivr.net/npm/marked@4.2.3/marked.min.js // @require https://cdnjs.cloudflare.com/ajax/libs/markdown-it/13.0.1/markdown-it.min.js // @require https://unpkg.com/axios/dist/axios.min.js // @connect api.forchange.cn // @connect wenxin110.top // @connect chatforai.net // @license MIT // @resource css https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.1.0/github-markdown.css // @resource css https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/default.min.css // @require https://cdn.jsdelivr.net/npm/showdown@2.1.0/dist/showdown.min.js // @require https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js // @require https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js // @downloadURL none // ==/UserScript== (function() { 'use strict'; //enc-start async function digestMessage(r) { const hash = CryptoJS.SHA256(r); return hash.toString(CryptoJS.enc.Hex); } const generateSignature = async r => { const { t: e, m: t } = r; const n = {}.PUBLIC_SECRET_KEY; const a = `${e}:${t}:${n}`; return await digestMessage(a); }; //enc-end //start function addChatBtn() { let mybtn = ``; $(".bg.s_btn_wr").after(mybtn) document.getElementById("mybtn").addEventListener("click", function() { console.log("reloadPage") if (window.location.href.indexOf("https:\/\/www.baidu.com\/s") > -1) { GM_add_box_style(2) addBothStyle() keyEvent() appendBox(2).then((res) => { pivElemAddEventAndValue(2) }) } }) } function isMobile() { var userAgentInfo = navigator.userAgent.toLowerCase(); var mobileAgents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"]; var mobile_flag = false; //根据userAgent判断是否是手机 for (let v = 0; v < mobileAgents.length; v++) { if (userAgentInfo.indexOf(mobileAgents[v].toLowerCase()) > -1) { mobile_flag = true; break; } } return mobile_flag; } //end //顶级配置 var your_qus var abortXml let regx =/search.*?\.cf/g; if (window.location.href.indexOf("bing.com") > -1) { GM_add_box_style(0) addBothStyle() keyEvent() appendBox(0).then((res) => { pivElemAddEventAndValue(0) }) //linkToBing_beautification_script() } if (window.location.href.indexOf("www.google.com") > -1 || window.location.href.match(regx)) { GM_add_box_style(1) addBothStyle() keyEvent() appendBox(1).then((res) => { pivElemAddEventAndValue(1) }) } if (window.location.href.indexOf("https:\/\/www.baidu.com\/s") > -1 && !isMobile()) { GM_add_box_style(2) addBothStyle() keyEvent() appendBox(2).then((res) => { pivElemAddEventAndValue(2) }) } else if (window.location.href.indexOf("https:\/\/m.baidu.com") > -1 || (window.location.href.indexOf("baidu.com") > -1 && isMobile())) {//手机百度 GM_add_box_style(2) addBothStyle() keyEvent() appendBox(6).then((res) => { pivElemAddEventAndValue(2) }) } //俄罗斯yandex if (window.location.href.indexOf("yandex.ru\/search") > -1 || window.location.href.indexOf("yandex.com\/search") > -1) { GM_add_box_style(1) addBothStyle() keyEvent() appendBox(3).then((res) => { pivElemAddEventAndValue(3) }) } //360so if (window.location.href.indexOf("so.com\/s") > -1) { GM_add_box_style(1) addBothStyle() keyEvent() appendBox(4).then((res) => { pivElemAddEventAndValue(4) }) } //fsoufsou if (window.location.href.indexOf("fsoufsou.com\/search") > -1) { setTimeout(()=>{ GM_add_box_style(1) addBothStyle() keyEvent() appendBox(5).then((res) => { pivElemAddEventAndValue(5) }) },3000) } //顶级函数 function uuid() { //uuid 产生 var s = []; var hexDigits = "0123456789abcdef"; for (var i = 0; i < 36; i++) { s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1); } s[14] = "4"; // bits 12-15 of the time_hi_and_version field to 0010 s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01 s[8] = s[13] = s[18] = s[23] = "-"; var uuid = s.join(""); return uuid; } function GM_add_box_style(case_web) { switch (case_web) { case 0: //bing GM_addStyle(` #gptAnswer{ margin: 15px; border-top: solid; border-bottom: solid; } #gptInput{ width:74%; border-radius: 4px; } #gptInputBox{ display: flex; justify-content: space-around; } #button_GPT:hover{ background:#ffffffcc; } #gptDiv{ border-radius: 8px; padding: 10px; margin-bottom: 9px; width:452px; translate:-20px; background:#ffffffcc; backdrop-filter: blur(5px); display: flex; flex-direction: column; } #button_GPT{ } #button_GPT{ background: transparent; border-radius: 4px; } #gptCueBox{ translate: 3px; } p{white-space: pre-line} `) break; case 1: //google GM_addStyle(` #gptAnswer{ margin: 15px; border-top: solid; border-bottom: solid; } #gptInput{ border-radius: 4px; width: 68%; } #button_GPT:hover{ background:#dcdcdccc; } #gptDiv{ width:452px; flex: 1; display: flex; flex-direction: column; height: fit-content; } #gptInputBox{ display:flex; justify-content: space-around; } #button_GPT{ background: transparent; border-radius: 3px; font-size: 14px; } #gptStatus{ margin-left: 7px; } p{white-space: pre-line} `) break; //baidu case 2: GM_addStyle(` #gptAnswer{ margin: 15px; border-top: solid; border-bottom: solid; } #gptInput{ border-radius: 4px; width: 68%; } #button_GPT:hover{ background:#4e6ef2; } #gptDiv{ width:452px; flex: 1; display: flex; flex-direction: column; height: fit-content; } #gptInputBox{ display:flex; justify-content: space-around; } #button_GPT{ background: #4460d4; border-radius: 3px; font-size: 14px; } #gptStatus{ margin-left: 7px; } p{white-space: pre-line} `) break; default: alert("参数没设定") } } function do_it() { let finalResult let normalArray let nowResult document.getElementById('gptAnswer').innerHTML = `
  openAI 已就绪,请输入你的问题
  openAI已就绪,请输入你的问题