Edge Addon Manual Redirect

手动从 Edge 插件商店跳转到 edgemobileapp 链接

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

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 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         Edge Addon Manual Redirect
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  手动从 Edge 插件商店跳转到 edgemobileapp 链接
// @match        https://microsoftedge.microsoft.com/addons/detail/*
// @license MIT
// @grant        GM_registerMenuCommand
// ==/UserScript==

(function () {
    'use strict';

    // 获取插件 ID
    function getExtensionId() {
        const parts = window.location.pathname.split('/');
        return parts[parts.length - 1]; // 最后一段即插件 ID
    }

    function redirect() {
        const extId = getExtensionId();
        if (!extId) {
            alert("未能识别插件 ID");
            return;
        }

        const target = `https://edgemobileapp.microsoft.com/?adjustId=1t1h6scl_1tc1psf8&extensionId=${extId}`;
        window.location.href = target;
    }

    // 注册菜单命令
    GM_registerMenuCommand("👉 跳转到 edgemobileapp", redirect);

})();