Atalho GPT

Um atalho para o ChatGPT

当前为 2025-03-05 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name          Atalho GPT
// @description   Um atalho para o ChatGPT
// @namespace     CowanGPT
// @license       CowBas
// @version       1.0
// @author        Cowanbas
// @match         *://*/*
// @run-at        document-start
// ==/UserScript==
(function() {
    'use strict';

    // Cria o botão
    var button = document.createElement('button');
    button.style.position = 'fixed';
    button.style.bottom = '15px';
    button.style.left = '17px';
    button.style.backgroundColor = 'transparent';
    button.style.border = 'none';
    button.style.padding = '0';
    button.style.cursor = 'pointer';
    button.style.opacity = '0.7';
    button.style.zIndex = '1000';
    button.style.width = '30px';
    button.style.height = '30px';

    var icon = document.createElement('div');
    icon.innerHTML = `<svg height="30" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
      <path d="M12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0ZM12 21.6C6.70514 21.6 2.4 17.2949 2.4 12C2.4 6.70514 6.70514 2.4 12 2.4C17.2949 2.4 21.6 6.70514 21.6 12C21.6 17.2949 17.2949 21.6 12 21.6Z" fill="#6E6E6E"/>
      <path d="M12 4.8C8.68629 4.8 6 7.48629 6 10.8C6 14.1137 8.68629 16.8 12 16.8C15.3137 16.8 18 14.1137 18 10.8C18 7.48629 15.3137 4.8 12 4.8ZM12 15.6C9.34822 15.6 7.2 13.4518 7.2 10.8C7.2 8.14822 9.34822 6 12 6C14.6518 6 16.8 8.14822 16.8 10.8C16.8 13.4518 14.6518 15.6 12 15.6Z" fill="#6E6E6E"/>
    </svg>`;
    icon.style.width = '100%';
    icon.style.height = '100%';
    icon.style.borderRadius = '50%';
    icon.style.overflow = 'hidden';

    button.appendChild(icon);

    button.onclick = function() {
        window.open('https://chat.openai.com/', '_blank');
    };

    document.body.appendChild(button);

    button.onmouseover = function() {
        button.style.opacity = '1';
    };

    button.onmouseout = function() {
        button.style.opacity = '0.7';
    };
})();