您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
include *:* is necessary because mini applications in Telegram are displayed within an IFRAME and have their own distinct addresses, separate from Telegram.This code bypasses the verification of these applications, making them believe you are using an Android device, thereby enabling their functionality on a PC.
// ==UserScript== // @name P2P Trade on Telegram Web app PC unlocker // @include *:* // @namespace http://tampermonkey.net/ // @version 0.1 // @description include *:* is necessary because mini applications in Telegram are displayed within an IFRAME and have their own distinct addresses, separate from Telegram.This code bypasses the verification of these applications, making them believe you are using an Android device, thereby enabling their functionality on a PC. // @author Atamg // @grant GM_getResourceText // @connect * // @license MIT // ==/UserScript== (function() { 'use strict'; // @include *:* is necessary because mini applications in Telegram are displayed within an IFRAME and have their own distinct addresses, separate from Telegram. // This code bypasses the verification of these applications, making them believe you are using an Android device, thereby enabling their functionality on a PC. // @license MIT const customConsole = { log: function() { // Оставьте эту функцию пустой, чтобы отключить все логи // или замените её на оригинальную функцию console.log // console.log.apply(console, arguments); } }; // Переназначаем console на нашу обертку //unsafeWindow.console = customConsole; //window.console = customConsole; // bypass the platform through proxying to open via the telegram web version if (unsafeWindow && unsafeWindow.Telegram && unsafeWindow.Telegram.WebApp) { unsafeWindow.Telegram.WebApp = new Proxy(unsafeWindow.Telegram.WebApp, { get(target, prop) { // Перехватываем обращение к свойству 'platform' if (prop === 'platform') { return 'android'; } // Перехватываем вызовы методов if (typeof target[prop] === 'function') { return function(...args) { console.log(`Method ${prop} called with arguments:`, args); // Изменяем поведение метода 'exampleMethod' if (prop === 'exampleMethod') { // Модифицируем аргументы или выполняем другие действия args[0] = 'modified argument'; } // Вызываем оригинальный метод return target[prop].apply(this, args); }; } return target[prop]; } }); } // bypass the platform through proxying to open via the telegram web version if (unsafeWindow && unsafeWindow.Telegram && unsafeWindow.Telegram.WebView) { unsafeWindow.Telegram.WebView = new Proxy(unsafeWindow.Telegram.WebView, { get(target, prop) { // Перехватываем обращение к свойству 'platform' if (prop === 'initParams') { return 'android'; } // Перехватываем вызовы методов if (typeof target[prop] === 'function') { return function(...args) { console.log(`Method ${prop} called with arguments:`, args); // Изменяем поведение метода 'exampleMethod' if (prop === 'exampleMethod') { // Модифицируем аргументы или выполняем другие действия args[0] = 'modified argument'; } // Вызываем оригинальный метод return target[prop].apply(this, args); }; } return target[prop]; } }); } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址