Greasy Fork is available in English.

GetThecookie

Get the cookie of the current web page with one click, and automatically release it and set it on the clipboard, which can be directly pasted and used (the get button is located in the lower left corner of the page).

Versión del día 28/11/2022. Echa un vistazo a la versión más reciente.

Tendrás que instalar una extensión para tu navegador como Tampermonkey, Greasemonkey o Violentmonkey si quieres utilizar este script.

You will need to install an extension such as Tampermonkey to install this script.

Necesitarás instalar una extensión como Tampermonkey o Violentmonkey para instalar este script.

Necesitarás instalar una extensión como Tampermonkey o Userscripts para instalar este script.

Necesitará instalar una extensión como Tampermonkey para instalar este script.

Necesitarás instalar una extensión para administrar scripts de usuario si quieres instalar este script.

(Ya tengo un administrador de scripts de usuario, déjame instalarlo)

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

(Ya tengo un administrador de estilos de usuario, déjame instalarlo)

// ==UserScript==
// @name         GetThecookie
// @name:zh-CN   一键获取网站cookie
// @name:zh-TW   一键获取网站cookie
// @name:zh-HK   一键获取网站cookie
// @namespace    https://www.techwb.cn/177.html
// @version      2.2
// @description  Get the cookie of the current web page with one click, and automatically release it and set it on the clipboard, which can be directly pasted and used (the get button is located in the lower left corner of the page).
// @description:zh-CN  一键获取当前网页cookie,并且自动放置于剪切板,可直接粘贴使用(获取按钮位于页面左下角)。
// @description:zh-TW  一键获取当前网页cookie,并自动释放设置于剪切板,可直接粘贴粘贴使用(获取按钮位于页面左下角)。
// @description:zh-HK  一键获取当前网页cookie,并自动释放设置于剪切板,可直接粘贴粘贴使用(获取按钮位于页面左下角)。
// @description:ja     现在の Web ページの Cookie をワンクリックで取得でき、取得ボタンの位置は左下隅にあり、ボタンをクリックすると、现在のページの Cookie がクリップボードに置かれます.
// @author       Techwb.cn
// @match        http*://*
// @include      http*://*
// @icon         https://www.techwb.cn/logo.png
// @grant        GM_setClipboard
// @license  none
// ==/UserScript==

(function() {
    'use strict';
    var lang = navigator.appName=="Netscape"?navigator.language:navigator.userLanguage;
    var btn={};
    switch (lang){
        case "zh-CN":
        case "zh-SG":
            btn={
                btname:"获取cookie" // 浏览器语言为简体中文,则输出简体;
            };
            break;
        case "zh-TW":
        case "zh-HK":
            btn={
                btname:"获取cookie" // 浏览器语言为台湾或香港繁体,则输出繁体;
            };
            break;
        default:
            btn={
                btname:"COOKIE" // 其他国家(默认),则输出英文;
            };
            break;
    }

    // Your code here...

    let Container = document.createElement('div');
        Container.id = "getcookie";
        Container.style.position="fixed"
        Container.style.color="red"
        // Container.style.right="0px" // 默认靠左边,靠右请去掉注释;
        Container.style.top="80%" // 垂直方向位置,可自定义;
        Container.style['z-index']="999999"
        Container.innerHTML =`
<div style="padding: 0px; border: 1px solid #aaa; border-radius: 21px; float: right; background: #fff; position: relative; ">
👉<button id="getcookie"
 style="background-image:url(https://XXX.jpg);
 padding: 6px;
 width: auto;
 height: auto;
 background-repeat:no-repeat;
 background-size:62px;
 border:0;
 background-color:transparent;
 background:red;
 border-radius:21px;
 color:#fff;
 text-align:center;">${btn.btname}</button>

</div>
`
/* ---按钮上方提示---
<div style="position: absolute;
    width: 65px;
    text-align: center;
    top: -21px;
    left: 0px;
    color: #ff8000;
    font-weight: bold;
    font-size: 14px;
    text-shadow: #fff 1px 0 0, #fff 0 1px 0, #fff -1px 0 0, #fff 0 -1px 0;">获取网站(${btn.btname})
</div>
---/按钮上方提示---
*/


document.body.appendChild(Container);
var b;
var current_cookies;
b = document.getElementById('getcookie');
        b.onclick = function (){
            current_cookies=document.cookie;
            GM_setClipboard(current_cookies);
            return;
        };

})();