This extension allows for easy, shortened URL link generation using a Chhoto URL server.
In order to use this extension, a Chhoto URL server is required. If you don't have one already, refer to the installation instructions.
The api_key
environment variable must be configured in the Chhoto URL server configuration.
For example, using Docker Compose, you can add the api_key
environment variable under environment:
like so:
environment:
- api_key=SECURE_API_KEY
Alternatively, using Docker Run, you can add -e api_key="SECURE_API_KEY" \
to the command arguments.
Note: The Chhoto URL server will output a warning if this is insecure, and a generated API key will be output. You may use that value if you can't think of a secure key, or you may generate an API key using your operating system's terminal.
For example, on Linux, you could generate an API key by running tr -dc A-Za-z0-9 </dev/urandom | head -c 128
In order for the Chhoto URL server to properly output the correct shortend URLs, and for this extension to do the same, the site_url
and port
environment variables must be properly set.
If your server is not located at http://localhost
, make sure to set the site_url
environment variable in the Chhoto URL server configuration. This value cannot be surrounded by quotes.
If your server's port is not 4567
, make sure to set the port
environment variable in the Chhoto URL server configuration. This value cannot be surrounded by quotes.
Example configuration:
environment:
- site_url=https://chhoto-url.example.com
- port=443
Once you have installed the extension, either through an extension store (see icons above) or from source, you must configure the extension.
- Right-click on the Chhoto URL extension icon (
). If the extension is not pinned, the Chhoto URL extension icon will be under this highlighted icon:
- Select "Manage Extension"
- Select "Preferences"
- Configure the settings under
Instance URL
,API Key
, andProtocol Filters
- (if the extension is not pinned) Click on the icon that is most similar to the highlighted icon in this image:
- (if the extension is not pinned) Click on the pin icon next to the Chhoto URL extension icon
- Right-click on the Chhoto URL extension icon (
)
- Select "Options"
- Configure the settings under
Instance URL
,API Key
, andProtocol Filters
When the Chhoto URL extension icon is clicked, the current page's URL will be shortened. The shortened link will be copied to the clipboard.
Alternatively, from v1.2.0 and onwards, you may right-click anywhere on a website or on the extension's icon (), and click "Manually generate a Chhoto URL". This button will open a popup, allowing users to manually generate a shortened URL.
This extension only communicates to the Chhoto URL server instance you configure. All of the extension's data is stored locally in your local browser storage. The API key is kept in plaintext.
Permission | Required so that the extension can... |
---|---|
activeTab |
Get the active tab's URL |
notifications |
Inform users if generating the shortened link was successful or not. |
clipboardWrite |
Copy the shortened link to your clipboard. |
storage |
Save the extension settings in your local browser storage. |
https://*/* |
Contact the configured Chhoto URL server instance. |
contextMenus |
Add an item (which opens a popup for manual URL generation) to the context menu |
- Run
git clone https://github.com/SolninjaA/Chhoto-URL-Extension.git
- Install the extension (see below for how to install the extension on common browsers)
- Visit
about:debugging#/runtime/this-firefox
- Click "Load Temporary Add-on..."
- Navigate to the cloned repository folder
- Select the
manifest.json
file - Click "Open"
- Visit
brave://extensions
- Enable "Developer mode" in the top right corner
- Click "Load unpacked"
- Navigate to the cloned repository folder
- Click "Select"
SolninjaA 💻 📆 📖 |
DarioDarko 💻 |
This project was inspired by and modified from Edward Shen's Shlink extension. Modifications include:
- Rewriting the backend code to contact a Chhoto URL server, rather than a Shlink server.
- Adding a popup page for manual URL generation.
- Changing the appearance of the
options.html
page. - Removing options which were either not possible to implement (because of the Chhoto URL server's limitations), or were not practical.
- Optimizing code where possible.
- Et cetera.
Syncing from (main repository) | Syncing to | Syncing every |
---|---|---|
https://github.com/SolninjaA/Chhoto-URL-Extension | https://git.solomon.tech/solomon/Chhoto-URL-Extension | 8 hours |