// ==UserScript== // @name ChatGPT助手【豪华版】 // @namespace http://www.luckyblank.cn/openai/ // @version 2023.03.29.01 // @author luckyblank // @description ChatGPT助手,无须繁琐的注册流程,无须key,直接与AI对话! // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAH1UExURUxpcXeqn3WqnHWonHSpnHWonHWpnG22knWpnHWpnHSmm3apm3SpnHWonHWpnHSonHWpnHWpm3apnXWpnHWpm3WpnP///8fc19fm43mrn67Nxf7///r8+6HFvNPk4JS8ssXb1XirnsDY0sPa1Pj7+qbHv5i/tXeqnvz9/X6uoo65roq2q+Tu7P3+/qrKwqDEu9bm4vP39qfIwPv9/NXl4ezz8Xqsn+nx73msn5/Dusnd2N7q59zp5pC6r4CwpKLFvIOxpszf2oSypsTa1fn7+/P49t/r6JrAt8LZ1L/X0d3q53aqnczf287h3Ie0qc7g3Pr8/LTQybDOxpvBuObv7c/h3PX5+Ory8ODr6OPt65G7sLnTzYWzp/n7+oi1qv7+/tTk4J7Cucve2Z3Cub7X0H+vo8LZ053CuKnJwff6+tnn4/3+/fD29XytoYWzqJe+tJa+tHapnHeqnaHEu8vf2oGxpazLw3utoMre2ZW9s7XRyu/19H2uou/186XHv6jJwNDi3sjd2OLt6u308ufw7tfm4rjTzK3MxOjw7tvp5dHi3sjd15m/tvL39q/Nxvb5+OPu64y3rIOyptnn5LbSy+Ds6eHs6tbl4cHZ0/v8/H6vo4GwpZ7Dus/h3fb6+ZK7sfT49/f6+aLFvavLw6zLxM3g28bc1pQLf2QAAAAVdFJOUwAtv5bz1PQH/dUuj5WQ/CyYwJHykqKEGP8AAAAJcEhZcwAAAHYAAAB2AU57JggAAAIcSURBVDjLhdNle9swEABgFdK0Kw7uHMfp6iTeAksaThpoUmZuV1x5zMxbx8wM7Xj7nZNjx/L2rNl9kXR6H51snwmhsWFTWQn8FSWGygKihLGmFP4ZpUXG7P5GWDcKZVEDeaKC1mfnHxUvoSV19YQOVFWTLdpiUfJ2POx/jOEzAy4tWU7KctPG95FpOjT0IA2PT80aSHEOpKQ5mSUxIA7bD2OzI5vdTNTt1QXBDvAxMT/7qkE+h8PdyoYC+DX0YgYyX4W+FwBunqYOhpp0YAl/1eN22Or5DPD8Jd6sBTiOZgYa8SfUysAMH+wWW/AK3ndbUWRADKUVMGIex1YrRGcs3uvYxcCzKVCAJTb66FZsFGDXTgHPMjD2WgWcFeCkHd/uoOshj0MD16QoLOI2+Q406ifpPXh4gisaOIXD4JiZXUoqwARx/Ab80zB7TJMzmK17nr4BK2eCOnocJGMMBBH9tO6FqYhveUJSwZsxBrpRDDltl6G3G7/8+K6AtLOZARu65hYwcLfL8s4l30EGCTzGwH6MA3Tew9u0Tp1HBmYOT+u+xZ62nl4AB91uGRQ+ZWAZ53HQqgMwgn3n6BC90+bl0nLJB51qH+QaphUD3EWuHVNuuhiQwlrPaS3n6zhEW+2G3I3TkSE3A5XalG860o/j/sSkcGAf62tS8MdvFfe3Oyf2tugyhBRB3qC/XuF/ADFWVOUHhFSXG4rXA78BYbiLJDUXqsMAAABXelRYdFJhdyBwcm9maWxlIHR5cGUgaXB0YwAAeJzj8gwIcVYoKMpPy8xJ5VIAAyMLLmMLEyMTS5MUAxMgRIA0w2QDI7NUIMvY1MjEzMQcxAfLgEigSi4A6hcRdPJCNZUAAAAASUVORK5CYII= // @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/* // @run-at document-end // @require https://code.jquery.com/jquery-3.6.0.min.js // @require https://cdn.jsdelivr.net/npm/sweetalert@2.1.2/dist/sweetalert.min.js // @require https://cdn.bootcdn.net/ajax/libs/layer/3.5.1/layer.js // @require https://cdn.staticfile.org/vue/2.7.0/vue.min.js // @require https://unpkg.com/element-ui/lib/index.js // @require https://cdn.jsdelivr.net/npm/typeit@2.0.2/dist/typeit.min.js // @require https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js // @require https://unpkg.com/axios/dist/axios.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://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 // @connect chatforai.cc // @connect www.luckyblank.cn // @connect www.luckyblank.cn/openai/bussinessapi/action/communicate // @grant GM_log // @grant GM_notification // @grant unsafeWindow // @grant GM_addStyle // @grant GM_setValue // @grant GM_getValue // @grant GM_setClipboard // @grant GM_xmlhttpRequest // @grant GM_addElement // @grant GM_openInTab // @grant GM_getResourceText // @grant GM_registerMenuCommand // @grant GM_info // @license MIT // @downloadURL none // ==/UserScript== (function () { 'use strict'; //引入css文件 $("head").append($('')); // $("head").append($('')); $("head").append($('')); $("head").append($('')); $("head").append($('')); //打字机效果 GM_addStyle(` @-webkit-keyframes blink { 0% { opacity: 1 } 50% { opacity: 0 } 100% { opacity: 1 } } @keyframes blink { 0% { opacity: 1 } 50% { opacity: 0 } 100% { opacity: 1 } } .ti-container { display: block; font-size: inherit } .ti-text-container { position: relative; display: inline; font-size: inherit } .ti-text-container:before { content: ''; display: inline-block; width: 1px; height: 1em; position: relative } .ti-text-container.active-container.ti-cursor:after { display: inline } .ti-cursor:after { display: none; content: '|'; bottom: .05em; right: -.25em; position: absolute; line-height: normal; font-size: inherit; -webkit-animation: blink 1s infinite; animation: blink 1s infinite } `); //在线客服效果 GM_addStyle(`@keyframes scaleToggleOne { 0% { transform:scale(1); -webkit-transform:scale(1) } 50% { transform:scale(2); -webkit-transform:scale(2) } 100% { transform:scale(1); -webkit-transform:scale(1) } } @keyframes scaleToggleTwo { 0% { transform:scale(1); -webkit-transform:scale(1) } 20% { transform:scale(1); -webkit-transform:scale(1) } 60% { transform:scale(2); -webkit-transform:scale(2) } 100% { transform:scale(1); -webkit-transform:scale(1) } } @keyframes scaleToggleThree { 0% { transform:scale(1); -webkit-transform:scale(1) } 33% { transform:scale(1); -webkit-transform:scale(1) } 66% { transform:scale(2); -webkit-transform:scale(2) } 100% { transform:scale(1); -webkit-transform:scale(1) } } .animated { -webkit-animation-duration: .5s; animation-duration: .5s; -webkit-animation-fill-mode: both; animation-fill-mode: both } .livechat-girl { width: 60px; height: 60px; border-radius: 50%; position: fixed; bottom: 0; right: 40px; opacity: 0; -webkit-box-shadow: 0 5px 10px 0 rgba(35,50,56,.3); box-shadow: 0 5px 10px 0 rgba(35,50,56,.3); z-index: 700; transform: translateY(0); -webkit-transform: translateY(0); -ms-transform: translateY(0); cursor: pointer; -webkit-transition: all 1s cubic-bezier(.86, 0, .07, 1); transition: all 1s cubic-bezier(.86, 0, .07, 1) } .livechat-girl:focus { outline: 0 } .livechat-girl.animated { opacity: 1; transform: translateY(-40px); -webkit-transform: translateY(-40px); -ms-transform: translateY(-40px) } .livechat-girl:after { content: ''; width: 12px; height: 12px; border-radius: 50%; background-image: linear-gradient(to bottom, #26c7fc, #26c7fc); position: absolute; right: 1px; top: 1px; z-index: 50 } .livechat-girl .girl { position: absolute; top: 0; left: 0; width: 100%; height: auto; z-index: 50 } .livechat-girl .animated-circles .circle { background: rgba(38,199,252,.25); width: 60px; height: 60px; border-radius: 50%; position: absolute; z-index: 49; transform: scale(1); -webkit-transform: scale(1) } .livechat-girl .animated-circles.animated .c-1 { animation: 2s scaleToggleOne cubic-bezier(.25, .46, .45, .94) forwards } .livechat-girl .animated-circles.animated .c-2 { animation: 2.5s scaleToggleTwo cubic-bezier(.25, .46, .45, .94) forwards } .livechat-girl .animated-circles.animated .c-3 { animation: 3s scaleToggleThree cubic-bezier(.25, .46, .45, .94) forwards } .livechat-girl.animation-stopped .circle { opacity: 0!important } .livechat-girl.animation-stopped .circle { opacity: 0!important } .livechat-girl .livechat-hint { position: absolute; right: 40px; top: 50%; margin-top: -20px; opacity: 0; z-index: 0; -webkit-transition: all .3s cubic-bezier(.86, 0, .07, 1); transition: all .3s cubic-bezier(.86, 0, .07, 1) } .livechat-girl .livechat-hint.show_hint { -webkit-transform: translateX(-40px); transform: translateX(-40px); opacity: 1 } .livechat-girl .livechat-hint.hide_hint { opacity: 0; -webkit-transform: translateX(0); transform: translateX(0) } .livechat-girl .livechat-hint.rd-notice-tooltip { max-width: 1296px!important } .livechat-girl .livechat-hint.rd-notice-tooltip .rd-notice-content { width: auto; overflow: hidden; text-overflow: ellipsis } @media only screen and (max-width:1599px) { .livechat-girl .livechat-hint.rd-notice-tooltip { max-width: 1060px!important } } @media only screen and (max-width:1309px) { .livechat-girl .livechat-hint.rd-notice-tooltip { max-width: 984px!important } } @media only screen and (max-width:1124px) { .livechat-girl .livechat-hint.rd-notice-tooltip { max-width: 600px!important } } .rd-notice-tooltip { -webkit-box-shadow: 0 2px 2px rgba(0,0,0,.2); box-shadow: 0 2px 2px rgba(0,0,0,.2); font-size: 14px; border-radius: 3px; line-height: 1.25; position: absolute; z-index: 65; max-width: 350px; opacity: 1 } .rd-notice-tooltip:after { position: absolute; display: block; content: ''; height: 20px; width: 20px; -webkit-box-shadow: none; box-shadow: none; -webkit-transform: rotate(-45deg); -moz-transform: rotate(-45deg); -ms-transform: rotate(-45deg); -o-transform: rotate(-45deg); transform: rotate(-45deg); -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; z-index: 50 } .rd-notice-tooltip .rd-notice-content { background: 0; border-radius: 3px; width: 100%; color: #fff; position: relative; z-index: 60; padding: 20px; font-weight: 400; line-height: 1.45 } .rd-notice-type-success { background-color: #26c7fc; -webkit-box-shadow: 0 5px 10px 0 rgba(38,199,252,.2); box-shadow: 0 5px 10px 0 rgba(38,199,252,.2) } .rd-notice-type-success .rd-notice-content { background-color: #26c7fc } .rd-notice-type-success:after { background-color: #26c7fc; -webkit-box-shadow: 0 5px 10px 0 rgba(38,199,252,.2); box-shadow: 0 5px 10px 0 rgba(38,199,252,.2) } .rd-notice-position-left { margin-left: -20px } .rd-notice-position-left:after { right: -6px; top: 50%; margin-top: -10px } .rd-notice-tooltip.single-line .rd-notice-content { height: 40px; padding: 0 20px; line-height: 40px; white-space: nowrap } .girl{border-radius: 50%;-webkit-animation:run 6s cubic-bezier(0.82, 0.11, 0.46, 0.98) 0s infinite; -webkit-user-drag: none;} .girl:hover{ -webkit-animation-play-state:paused; } @-webkit-keyframes run{ from{ -webkit-transform:rotate(0deg); } to{ -webkit-transform:rotate(360deg); } } `); //公共效果 GM_addStyle(` #app{ min-width:539px; right: 20px; top: 100px; z-index: 9999; } .history-questions::-webkit-scrollbar { display:none } .history-questions{ background-color: #ddddda; min-height: 291px; max-height: 291px; padding: 10px; overflow-y: scroll; text-align: left; } .d-none{ display:none !important; } .layui-layer-content .d-none{ display:block !important; } .fun-group{ display: flex; justify-content: space-between; } .setting-wrapper{ padding:20px; } .el-input-location{ width: 207px; } .notice-textarea textarea{ width:100% !important; height: 124px; } .footer-info{ color: #909399; text-align: center; } .update-tip{ position: absolute; left: 10px; width: 96%; } .update-tip .el-alert__closebtn { color: red !important; } `); //逻辑代码 //加载外部化配置文件 let outArgs = {}; outArgs = getArgs(); //添加元素 let chatAi = `