-
Notifications
You must be signed in to change notification settings - Fork 4
/
memefi-web.user.js
38 lines (32 loc) · 1.27 KB
/
memefi-web.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// ==UserScript==
// @name MemeFI web
// @version 1.7
// @description Running MemeFI in a browser
// @author mudachyo
// @match https://tg-app.memefi.club/*
// @match https://web.telegram.org/*/*
// @grant none
// @icon https://s2.coinmarketcap.com/static/img/coins/64x64/29373.png
// @downloadURL https://github.com/mudachyo/MemeFi-Coin/raw/main/memefi-web.user.js
// @updateURL https://github.com/mudachyo/MemeFi-Coin/raw/main/memefi-web.user.js
// @homepage https://github.com/mudachyo/MemeFi-Coin
// ==/UserScript==
(function() {
function updateIframeSrc() {
const iframe = document.querySelector('iframe');
if (iframe) {
let src = iframe.src;
if (src.includes('tg-app.memefi.club') && !src.includes('tgWebAppPlatform=android')) {
if (src.includes('tgWebAppPlatform=weba')) {
src = src.replace(/tgWebAppPlatform=weba/g, 'tgWebAppPlatform=android');
} else if (src.includes('tgWebAppPlatform=web')) {
src = src.replace(/tgWebAppPlatform=web/g, 'tgWebAppPlatform=android');
}
iframe.src = src;
console.log('Ссылка обновлена:', src);
}
} else {
}
}
setInterval(updateIframeSrc, 1000);
})();