Edge Addon Manual Redirect

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

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

})();