GetThecookie

現在の Web ページの Cookie をワンクリックで取得でき、取得ボタンの位置は左下隅にあり、ボタンをクリックすると、現在のページの Cookie がクリップボードに置かれます.

2022/11/25のページです。最新版はこちら

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         GetThecookie
// @name:zh-CN   一键获取网站cookie
// @name:zh-TW   一鍵獲取網站cookie
// @name:zh-HK   一鍵獲取網站cookie
// @namespace    https://www.techwb.cn/software/
// @version      1.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: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:"获取网站"
            };
            break;
        case "zh-TW":
        case "zh-HK":
            btn={
                btname:"獲取網站"
            };
            break;
        default:
            btn={
                btname:"THEWEB"
            };
            break;
    }

    // Your code here...

    let Container = document.createElement('div');
        Container.id = "getcookie";
        Container.style.position="fixed"
        Container.style.color="red"
        Container.style.left="0px"
        Container.style.top="92%"
        Container.style['z-index']="999999"
        Container.innerHTML =`
<span style="font-size:19px;">▶</span>
<div style="padding: 2px; border: 1px solid #aaa; border-radius: 21px; float: right; background: #fff; position: relative; ">
<button id="getcookie"
 style="background-image:url(https://XXX.jpg);
 padding: 2px;
 width: 60px;
 height: auto;
 background-repeat:no-repeat;
 background-size:62px;
 border:0;
 background-color:transparent;
 background:red;
 border-radius:41px;
 font-size:14px;
 color:#fff;
 text-align:center;">Cookie</button>
<div style="position: absolute;
    width: 62px;
    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>
 </div>
`
/*
==另一种样式==
<span style="font-size:25px;">▶</span>
<div style="padding: 6px; 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:41px;
font-size:12px;
color:#fff;
text-align:center;
">获取Cookie</button>
</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;
        };

})();