mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-01-01 09:06:24 +01:00
Update content of files
This commit is contained in:
parent
d75ad191e7
commit
b1d85fdc12
3 changed files with 13 additions and 4 deletions
|
@ -9,7 +9,7 @@
|
|||
|
||||
var initParams = urlParseHashParams(locationHash);
|
||||
|
||||
var isIframe = false;
|
||||
var isIframe = false, iFrameStyle;
|
||||
try {
|
||||
isIframe = (window.parent != null && window != window.parent);
|
||||
if (isIframe) {
|
||||
|
@ -23,8 +23,17 @@
|
|||
if (!dataParsed || !dataParsed.eventType) {
|
||||
return;
|
||||
}
|
||||
receiveEvent(dataParsed.eventType, dataParsed.eventData);
|
||||
if (dataParsed.eventType == 'set_custom_style') {
|
||||
iFrameStyle.innerHTML = dataParsed.eventData;
|
||||
} else {
|
||||
receiveEvent(dataParsed.eventType, dataParsed.eventData);
|
||||
}
|
||||
});
|
||||
iFrameStyle = document.createElement('style');
|
||||
document.head.appendChild(iFrameStyle);
|
||||
try {
|
||||
window.parent.postMessage(JSON.stringify({eventType: 'iframe_ready'}), '*');
|
||||
} catch (e) {}
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<meta name="MobileOptimized" content="176" />
|
||||
<meta name="HandheldFriendly" content="True" />
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<script src="https://tg.dev/js/telegram-web-app.js?1"></script>
|
||||
<script src="https://tg.dev/js/telegram-web-app.js?2"></script>
|
||||
<script>
|
||||
function setThemeClass() {
|
||||
document.documentElement.className = Telegram.WebApp.colorScheme;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<meta name="MobileOptimized" content="176" />
|
||||
<meta name="HandheldFriendly" content="True" />
|
||||
<meta name="robots" content="noindex,nofollow" />
|
||||
<script src="https://telegram.org/js/telegram-web-app.js?1"></script>
|
||||
<script src="https://telegram.org/js/telegram-web-app.js?2"></script>
|
||||
<script>
|
||||
function setThemeClass() {
|
||||
document.documentElement.className = Telegram.WebApp.colorScheme;
|
||||
|
|
Loading…
Reference in a new issue