glassnode account sharing

glassnode accont sharing

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği yüklemek için Tampermonkey gibi bir uzantı yüklemeniz gerekir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         glassnode account sharing
// @namespace    https://glasscookie.vercel.app
// @version      0.1
// @description  glassnode accont sharing
// @author       Bojin Li (Brian)
// @match        https://studio.glassnode.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=glassnode.com
// @grant        GM_xmlhttpRequest
// @license      MIT
// ==/UserScript==

(function () {
    "use strict";

    // set up uuid
    var uuid = "cus_nq7MdbmjrOOBw5Ee";
    GM_xmlhttpRequest({
        method: "GET",
        url: "https://api.glassnode.com/v1/user/info",
        onload: function (response) {
            console.log("get user info success");
            console.log(response.responseText);
            if (JSON.parse(response.responseText)['uuid'] == uuid) {
                console.log("uuid is match");
                // upload local cookie to remote
                var x = document.cookie;
                console.log(x);
                var output = {};
                x.split(/\s*;\s*/).forEach(function (pair) {
                    pair = pair.split(/\s*=\s*/);
                    output[pair[0]] = pair.splice(1).join("=");
                });
                var json = JSON.stringify(output, null, 4);
                console.log(json);
                GM_xmlhttpRequest({
                    method: "POST",
                    url: "https://glasscookie.vercel.app/upload",
                    headers: {
                        "Content-Type": "application/json",
                    },
                    data: json,
                    dataType: "json",
                    onload: function (response) {
                        console.log("cookie upload to remote success");
                        console.log(response.responseText);
                    },
                    onerror: function (response) {
                        console.log("cookie upload to remote failed");
                    },
                });
            } else {
                // set new cookie to local
                GM_xmlhttpRequest({
                    method: "GET",
                    url: "https://glasscookie.vercel.app/get",
                    onload: function (response) {
                        console.log("cookie dowload from remote success");
                        console.log(response.responseText);
                        document.cookie = response.responseText;
                    },
                    onerror: function (response) {
                        console.log("cookie dowload from remote failed");
                    },
                });
            }
        },
        onerror: function (response) {
            console.log("get user info filed");
        },
    });
})();