How rayanfer32/userscripts works
This is a Google Photos userscript for sending selected photos to Telegram. The user clicks an injected button; the script reads or prompts for bot settings, collects selected photos, and runs a concurrent upload queue while showing progress. Uploading is implemented through Telegram’s Bot API; deleting originals is not implemented despite the script’s name. The single-file excerpt supports the UI, configuration, selection, and upload components, but omits queue-worker details, so their connections are left unverified.
Main entry points: google-photos-to-telegram.user.js Sync coordinator
Components 12
Page interface
- Sync button
google-photos-to-telegram.user.js - Progress UI
google-photos-to-telegram.user.js
Sync workflow
- Sync coordinator
google-photos-to-telegram.user.js - Photo selection
google-photos-to-telegram.user.js - Photo fetch
google-photos-to-telegram.user.js - Concurrent upload queue
google-photos-to-telegram.user.js - Photo upload
google-photos-to-telegram.user.js
Configuration
- Bot configuration
google-photos-to-telegram.user.js
Other components
- User
- Google Photos page
- Telegram Bot API
- Userscript storage
Connections 12
- User → Sync button: clicks
google-photos-to-telegram.user.js - Sync button → Sync coordinator: starts
google-photos-to-telegram.user.js - Sync coordinator → Bot configuration: reads settings
google-photos-to-telegram.user.js - Bot configuration → Userscript storage: reads and writes
google-photos-to-telegram.user.js - Sync coordinator → Photo selection: gets selected
google-photos-to-telegram.user.js - Photo selection → Google Photos page: reads selection
google-photos-to-telegram.user.js - Sync coordinator → Progress UI: updates
google-photos-to-telegram.user.js - Sync coordinator → Photo fetch: obtains photo blobs
google-photos-to-telegram.user.js - Photo fetch → Google Photos page: fetches photos
google-photos-to-telegram.user.js - Sync coordinator → Concurrent upload queue: dispatches jobs
google-photos-to-telegram.user.js - Concurrent upload queue → Photo upload: runs uploads
google-photos-to-telegram.user.js - Photo upload → Telegram Bot API: posts photo
google-photos-to-telegram.user.js