copia cookie

copia i cookie della pagina negli appunti

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name           copia cookie
// @author         figuccio
// @version        0.2
// @description    copia i cookie della pagina negli appunti
// @namespace      https://greasyfork.org/users/237458
// @match          *://*/*
// @icon           https://www.google.com/s2/favicons?sz=64&domain=bing.com
// @grant          GM_setClipboard
// @noframes
// @grant          GM_addStyle
// @grant          GM_setValue
// @grant          GM_getValue
// @license        MIT
// ==/UserScript==
(function() {
 'use strict';
let Container = document.createElement('div');
Container.id = "get-cookie-current_url";
Container.title ="copia negli appunti";
Container.style.position="absolute"
Container.style.left="550px"
Container.style.top="0px"
Container.style['z-index']="99999999999"
Container.innerHTML =`<button id="but-get-cookie-current_url" style="position:absolute;background:green;color:red;">Copia cookie</button>`

document.body.appendChild(Container);
//////////////////////////////////////funzione alert
const button = document.getElementById('but-get-cookie-current_url');
button.addEventListener('click', function() {
  alert('copiato!');
});
 /////////////////////////////////////////////////////////////
var btn;
var current_cookies;
btn = document.getElementById('but-get-cookie-current_url');
        btn.onclick = function (){
            current_cookies=document.cookie;
            GM_setClipboard(current_cookies);
            return;
        };

})();