copia cookie

copia i cookie della pagina negli appunti

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==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;
        };

})();