ridvan / send-to-telegram

A browser extension to send selected text, link, and images on web pages to Telegram via Telegram Bot API.
MIT License
7 stars 0 forks source link
browser-extension chrome-extension send-to-telegram telegram telegram-bot telegram-bot-api

Send to Telegram

A browser extension to send selected contents on web pages to Telegram via Telegram Bot API.

Chrome Webstore Badge Microsoft Add-ons Badge


Send to Telegram extension helps you send texts, links, and images on web pages easily to yourself or group chats using the context menu of the browser, as a Telegram message. It has an optional logging feature to save the messages that you have sent, similar to bookmarks.

Documentation

Installation

  1. Create a Telegram Bot and obtain a Chat ID to start sending messages. You can follow the steps in the installation wizard to complete the setup process.
  2. In the Telegram app, open the chat dialog with your bot and type /start so that it can access to the chat.
  3. Go to the Settings page and save these credentials. Check out Message and Log settings as well, they are pretty straight-forward.
  4. Start sending messages by simply right-clicking on the content and then clicking on the 'Send this to Telegram' option.

Features

Homepage

  1. Connection Status: Checks if the Telegram Bot Token is correct and functional.
  2. Total Messages Sent: Increments upon each successful message sent.
  3. Last Messages: Time and content type of the last successful/failed messages.
  4. Embed View: Opens the extension in a new tab, and has Wipe Data and Re-open Guide features.

Settings

User Settings

  1. Telegram Bot Token: The token that you obtain by messaging @BotFather on Telegram. The process of getting a token is super easy; don't be discouraged thinking it's necessary to be tech-savvy. Simply start chatting with the bot and you'll figure it out.
  2. Chat ID: Your personal identifier on Telegram which is required for the Bot to be able to find and text you. You can use @userinfobot. Simply start chatting with this bot and it will reply with your id. (It's safe, you can block the bot afterward if you want.)

Message Settings

  1. Disable Notification Sound: The message notification of the bot is delivered silently to you.
  2. Disable Link Preview: The OpenGraph title, description and image of the link won't be shown.
  3. Add Source Link: The source link of the content will be added to the message as a button.
  4. Send as Photo: The image will be shown on the chat directly. This option compresses the image upon sending it; however, it's not noticeable for regular content where you don't expect the image to be high quality.
  5. Send as Document: The image will be sent without compression, and you will have to download it to see the image.
  6. Send as Link: Images won't get uploaded to Telegram and only the image of the link will be sent.

Log Settings

  1. Store Timestamps Only: Only the message date and content type will be saved, the message content won't be available to check out later.
  2. Store Everything: You will be able to see the content you sent as well as its delivery date and content type.

Logs

Contributing

PRs are welcome! To contribute:

  1. Fork the project.
  2. Create your feature branch. (git checkout -b username/feat/the-feature-name)
  3. Commit your changes. (git commit -m 'feat(domain): info about the feature')
  4. Push to the branch. (git push origin username/feat/the-feature-name)
  5. Open a Pull Request.

Development

First, let's clone the project and install the dependencies.

git clone https://github.com/ridvan/send-to-telegram.git
cd send-to-telegram
npm install

Then, we need to add the 'src' folder to the Chrome as an unpacked extension.

  1. Go to the Extensions Page on Chrome.
  2. Enable Developer Mode from the top-right side of the page.
  3. Click on the Load Unpacked button.
  4. Select the 'src' folder under the 'send-to-telegram' folder.

You need to reload the extension in the Extensions Page to see your changes. You can either click on the refresh icon in the Extensions page or use an unpacked Extension Reloader like this one.

Resources

Disclaimer

This project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with Telegram, or any of its subsidiaries or its affiliates. The official Telegram website can be found at telegram.org. The name "Telegram" as well as related names, marks, emblems and images are registered trademarks of their respective owners.