您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Send from web to telegram using script
js
const BOT_TOKEN = "enter_bot_token_here";
const CHAT_ID = "enter_chat_id_here";
with your actual bot token and chat ID.The script listens for window.postMessage
events from the Zalo Web page.
When it receives a message with the matching type you define, it extracts:
dName
)content
)It then sends this information to your Telegram chat via the Telegram Bot API.
From another script or injected code on the Zalo Web page, post a message like this:
window.postMessage({
type: "DEFINE-YOUR-TYPE-HERE", // Must match the type you set in the script
payload: parsedZaloData // The parsed JSON object containing message data
}, "*");
Replace "DEFINE-YOUR-TYPE-HERE" with the same string you put in in the script.
{
"data": {
"msgs": [
{
"dName": "John Doe",
"content": "Hello from Zalo!"
}
]
}
}