Omzero Get Access Token

get access_token

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

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

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.

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

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!)

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.

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

// ==UserScript==
// @name            Omzero Get Access Token
// @namespace       https://vfa-vinhtt.github.io
// @description     get access_token
// @version         1.0.2
// @icon
// @author          vinhtt
// @license         MIT
// @connect         self
// @include         https://data-stg-jp.omronconnect.mobi/app/oauth2-frontend/static/result.html?*
// @run-at          document-idle
// @noframes
// @grant none
// ==/UserScript==

(function(window, document) {
    "use strict";
    let params = [];
    window.location.href.split(/\?|\&/).forEach(item => {
        let [key, value] = item.split("=") || [];
        if (key === "provider_user_id" || key === "oauth_token" || key === "refresh_token") {
            key = key.replace("provider_user_id", "ogsc_id").replace("oauth_token", "token_test");
            params.push([key, value]);
        }
    });
    let link = "";
    params.forEach(([key, value]) => {
        link += `${key}=${value}&`;
    });
    link = "https://cdn-s3-dev-apne1-hi875.zero-events.com/omwalk/index.html#/?" + link;
    document
        .querySelector(".alert-warning")
        .insertAdjacentHTML("beforeEnd", `<p>Link UserApp: <a href="${link}">${link}</a><p>`);
})(window, document);