fk-telegram-extension
Debug, repair, and verify the mtips5s_hunt_tele_v2 Telegram Web Chrome extension from Codex. Use for Telegram selected video batch download issues, repeated first video downloads, media viewer close problems, MT Logs analysis, extension reload/manual QA instructions, content script order, popup/back
Install
mkdir -p .claude/skills/fk-telegram-extension && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/16879" && unzip -o skill.zip -d .claude/skills/fk-telegram-extension && rm skill.zipInstalls to .claude/skills/fk-telegram-extension
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Debug, repair, and verify the mtips5s_hunt_tele_v2 Telegram Web Chrome extension from Codex. Use for Telegram selected video batch download issues, repeated first video downloads, media viewer close problems, MT Logs analysis, extension reload/manual QA instructions, content script order, popup/background/content script changes, or any task touching js/telegram-debug-log-manager.js, js/media-viewer-active-video-patch.js, js/telegram-selected-batch-patch.js, js/teleram-contentScript.js, popup.html, js/popup.js, background scripts, or manifest.json.About this skill
FK Telegram Extension
Project Root
Use /Users/apple/Desktop/project_8/mtips5s_hunt_tele_v2 as the default workspace root.
Core Files
manifest.json: keep content script order stable.js/telegram-debug-log-manager.js: ownsMT Logs, copy/clear/snapshot logs, viewer video/control diagnostics.js/media-viewer-active-video-patch.js: selects active/current viewer video and closes Telegram media viewer safely.js/telegram-selected-batch-patch.js: intercepts selected batch clicks and runs scan-then-download.js/teleram-contentScript.js: existing Telegram extension content logic.popup.htmlandjs/popup.js: popup UI and user controls.
Required content script order:
js/telegram-debug-log-manager.jsjs/media-viewer-active-video-patch.jsjs/telegram-selected-batch-patch.jsjs/teleram-contentScript.js
Selected Video Batch Rule
For multi-video selected downloads, use a two-phase flow:
- Scan all selected videos first.
- Close the media viewer between items using the real close button.
- Dispatch downloads only after scan completes.
Never use synthetic Escape or synthetic keyboard back behavior to close Telegram media viewer. Telegram Web may treat it as navigation/back and leave the chat or page.
Safe Viewer Close
Prioritize Telegram desktop media viewer controls with:
- Parent:
.media-viewer-buttons - Button:
button.btn-icon - Icon:
.tgico.button-icon - Icon code:
e961 - Ignore controls with
hideoris-hidden.
Expose or preserve window.__mtips5sCloseTelegramMediaViewer() when repairing close behavior.
If the viewer cannot close, log the failure and avoid adding a stale first-video URL to the media list.
Log Hygiene
- Do not write full private media URLs into reports.
- Prefer hash, length, kind,
locationId, parsed file name, and event names. - Important success signal:
custom-batch-scan-complete.media[*].url.locationIddiffers across selected videos. - Failure signal: repeated
locationId,custom-batch-close-viewer-timeout,custom-batch-scan-item-error, orviewerAfter: true.
Verification
Run static checks after related edits:
node --check js/media-viewer-active-video-patch.js
node --check js/telegram-selected-batch-patch.js
node --check js/telegram-debug-log-manager.js
node -e "const m=require('./manifest.json'); console.log(m.content_scripts[0].js.join(' -> '))"
rg -n "Escape|KeyboardEvent" js/media-viewer-active-video-patch.js js/telegram-selected-batch-patch.js
Expected:
- All
node --checkcommands pass. - Manifest order matches the required order above.
rgfinds no synthetic Escape/KeyboardEvent usage in the selected batch patches.
Manual QA Script
When code changes need browser verification, ask the user to:
- Reload the unpacked extension in Chrome.
- Reload Telegram Web.
- Open
MT Logsand clickClear. - Select multiple videos and click
FORCE DOWNLOAD. - Confirm all selected videos download and Telegram does not leave the chat/page.
- Copy logs if
custom-batch-close-viewer-timeoutorcustom-batch-scan-item-errorappears.
Reporting
Update .manager/implementation.md with changed files and reasons. Update .manager/test-report.md with static checks and manual QA status. Use $fk-qa-release before final handoff.