Edge Addon Manual Redirect

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

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 or Violentmonkey 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.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

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

})();