TryGalaxy Everywhere

修改网页信息以实现在任何浏览器都能尝试Galaxy设备

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 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         TryGalaxy Everywhere
// @namespace    github.com/hmjz100
// @version      0.1
// @homepageURL  https://viayoo.com/
// @author       Hmjz100
// @description  修改网页信息以实现在任何浏览器都能尝试Galaxy设备
// @run-at       document-start
// @match        *.trygalaxy.com/*
// @match        *://trygalaxy.com/*
// @license      MIT
// @grant        none
// ==/UserScript==
(function() {
    // 判断是否该执行
    const key = encodeURIComponent('TryGalaxyEverywhere:执行判断');
    if (window[key]) {
        return;
    };
    window[key] = true;

    // 开始执行代码
    Object.defineProperty(window.navigator, 'standalone', {
        get: function() {
            return true;
        }
    });
    Object.defineProperty(window.navigator, 'userAgent', {
        get: function() {
            return 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 mobile/15E148 Safari/604.1';
        }
    });

})();