agentskills.codes
FK

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.zip

Installs 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.
553 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)

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: owns MT 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.html and js/popup.js: popup UI and user controls.

Required content script order:

  1. js/telegram-debug-log-manager.js
  2. js/media-viewer-active-video-patch.js
  3. js/telegram-selected-batch-patch.js
  4. js/teleram-contentScript.js

Selected Video Batch Rule

For multi-video selected downloads, use a two-phase flow:

  1. Scan all selected videos first.
  2. Close the media viewer between items using the real close button.
  3. 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 hide or is-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.locationId differs across selected videos.
  • Failure signal: repeated locationId, custom-batch-close-viewer-timeout, custom-batch-scan-item-error, or viewerAfter: 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 --check commands pass.
  • Manifest order matches the required order above.
  • rg finds no synthetic Escape/KeyboardEvent usage in the selected batch patches.

Manual QA Script

When code changes need browser verification, ask the user to:

  1. Reload the unpacked extension in Chrome.
  2. Reload Telegram Web.
  3. Open MT Logs and click Clear.
  4. Select multiple videos and click FORCE DOWNLOAD.
  5. Confirm all selected videos download and Telegram does not leave the chat/page.
  6. Copy logs if custom-batch-close-viewer-timeout or custom-batch-scan-item-error appears.

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.

Search skills

Search the agent skills registry