export private key

export private key for dark forest player

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         export private key
// @namespace    http://github.com/harryhare
// @version      0.1
// @description  export private key for dark forest player
// @author       You
// @match        https://zkga.me/play/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// @license      GPL3.0
// ==/UserScript==

(function () {
    'use strict';
    let container = document.createElement("div");
    container.style.position = "fixed";
    container.style.top = "0";
    container.style.left = "0";
    container.style.height = "200px";
    container.style.width = "200px";


    let input = document.createElement("input");
    input.style.width = "100%";
    input.placeholder = "address";
    let output = document.createElement("div");
    output.style.width = "100%";
    output.innerText = "0x" + "0000000000000000000000000000000000000000";
    output.style.backgroundColor = "white";
    let button = document.createElement("button");
    button.style.width = "100%";
    button.style.backgroundColor = "grey";
    button.innerText = "导出私钥";
    button.onclick = async () => {
        let userId = input.value;
        if (userId.length !== 42) {
            return;
        }
        let key = `skey-${userId}`
        output.innerText = localStorage.getItem(key);
    };


    container.appendChild(input);
    container.appendChild(output);
    container.appendChild(button);
    document.body.appendChild(container);
})();