Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/trossr32/magnet-linker-browser-extension

An extension for Chromium and Firefox browsers that extends magnet links on websites to enable the quick adding of torrents to Transmission via the RPC API.
https://github.com/trossr32/magnet-linker-browser-extension

chrome chrome-extension edge edge-extension extension-chrome extension-edge firefox firefox-addon firefox-extension magnet-link magnet-linker rpc-api torrents transmission transmission-api

Last synced: 2 months ago
JSON representation

An extension for Chromium and Firefox browsers that extends magnet links on websites to enable the quick adding of torrents to Transmission via the RPC API.

Awesome Lists containing this project

README

        

# Magnet Linker

[![Chrome Web Store](https://img.shields.io/chrome-web-store/v/neokhcngmjnlbnphpfmiidlljbpffecd?label=Chrome%20web%20store&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADdYAAA3WAZBveZwAAAIISURBVDhPdVLPaxNBFP52tyVpTGPbIImlLVEDtvVWwRZPooJUiLd6WBQFETTtRelV%2FAc8it6s6V0r%2BOsaBD14UwtCwEp%2FYNAejLvZNLuzM9M3s5tgC%2F3g7Xvvm%2Fn2vTczBv7D%2BrydI3eXrEQ2LqS0uJTf%2FZC%2Faof8yemll9tqn0JXSCKb3FOyjCb2gYR%2FPRbemnr2YkXlWkii6%2BQqnfwg%2BJxz12dzVHnFWHx9Lnd%2BdaB2aiu1p5KZOkS%2FkQDbiZkITcYaPCUneiie%2F3TSyZz4nUSSmbAOD6Ln6m186B2GCYlLuS2kt5cB7mmhlH0D3g67Z1J8pd0r8Lno6gXDLsP%2BYuJhdQMPqpuYe2%2BheeSGXlMwaBjLNEpKOK6Ib2MenGNZvPOHUG8GitJYd0K8%2FZWn3emYUWKjqIT6QAR9P056CATNtQ%2BME2eorV1Ila1FMfCD%2F8T0sItMwooZIJs0MTvSAEInZtScsmadtQtFimciCvjjfsXCzEXk00P0kzTuTDGMNpZhiuh0JRX3A76kruM45atkfXqFYFBb%2Bf4ChBSYtP7h8mA2XgECJloknDAflaqq1TJZdzhJgrqzhlZrExfoejrg9P4CxsuZ6cqGnpjEz8ndJGupvINZqpQwo0MJuXDbAb%2FWf6aiXtjeJ0Ztj5G7T1YaTSQKC0dHApqpFobiDbX4mCrV9UYAu%2FF1yscRLQLJAAAAAElFTkSuQmCC&style=plastic&color=brightgreen)](https://chrome.google.com/webstore/detail/magnet-linker/neokhcngmjnlbnphpfmiidlljbpffecd) [![Chrome Web Store](https://img.shields.io/chrome-web-store/users/neokhcngmjnlbnphpfmiidlljbpffecd?label=users&style=plastic&color=brightgreen)](https://chrome.google.com/webstore/detail/magnet-linker/neokhcngmjnlbnphpfmiidlljbpffecd)

[![Mozilla Add-on](https://img.shields.io/amo/v/magnet-linker?label=Firefox%20add-ons&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAA4AAAANCAYAAACZ3F9%2FAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAI6SURBVChTfVJNSFRRGD33vjdv3nvOmx9%2FygQRs5yoHAiMyGUGgdlGym2LNjW0SGhjtNB9hJvauAmiMGjTSmhTRBpWi1AzwkZTR0mdmeffzJt5z3e%2F7gyTtIgOXD74OOfcw%2BHD%2F0DZHo3syy%2FkvFBdHYBX579R8obg%2Bf3Y959Q%2BuLh6rYCVp2g0YYkQuoUlNYa1j%2F5jj6e0RE2NxAMWFAVQOAzhNbLWsfXy3y5kaJ7LZdA%2FnN46mm4wevx9Pjb9Iee%2B%2B5mpEvleRiRbJnaBJ8lhu7G2fDI%2FHTlR7od%2F4So04loEaglzKeu0tzUINPcIMzGBZzsG0XDsSVA04hMf4H5XjsXfefqsKN3ggWAozpwKIzjXa%2FZ%2BRuD2LJM5Ow2MIOAXQFkOIPH2mTkE6q3EWuW1QHSEORgtrYD418GUGQJWGEdoV1g%2Fv1Z1Hd%2Fg9i2wMIylTAaee5rW1bYIWDbABZrMDGZwFyGY5k2kVZtZCgPUcxBrMhEfBf0SwGtqzb3PXMlv1aXwo4Ubpm4wiZhFBaxl1mGbf%2BEcGaQCLwB3y6BF6RJyshShs1WyklHksna5rVHRmQP0D0UNAXTogUKJ3SYP6CXS4txeCIGErGh4MjYcEW4GhrgQnVeWQ25XiuaBw%2B4QMAHVPkUWYo8E6cYhqD6CfWI6NbHnpYODmA1dCfoM%2Fch052besjhWtAF5wL%2BvorSjkXMNZ9pFt2KLj2Wsf66nD%2BQBu2Sfg2MToEY56R8Z6S%2BbCo8mKlSJIDf81Pn%2Bw9CHy8AAAAASUVORK5CYII%3D&style=plastic&color=orange)](https://addons.mozilla.org/en-GB/firefox/addon/magnet-linker/) [![Mozilla Add-on](https://img.shields.io/amo/users/magnet-linker?label=users&style=plastic&color=orange)](https://addons.mozilla.org/en-GB/firefox/addon/magnet-linker/)

[![](https://img.shields.io/static/v1?label=Edge%20add-ons&message=v2.0.1.0&color=blue&style=plastic&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJdSURBVDhPVVLPaxNBFP7eZJPNNomCqGj1aBGkB8WKF4/iyR4sQqGm4M1TKyoI1T+gf0BBqHhRoQW9CO1BEcUKIhSlh4rx18FKm1q7aZJustmdnZ3xTSj+ePDNDPPeN9+bb4bwT5x4vdqrocYN5HlNsg/oEFF7haj1Ku/UpxdPj77bKcUf4sBCbcQgnTZQRU0KGgk0xTDoIOf4KLjrxsvV77rZcHz+6G3ZJZ5aaFwCzEMDQ0xkApMsEZJ3IuRz6yjl11DIb8LNth45IhmmgQX/EGc/BVW/GPoNmFTB8TLwDvTA2eN2iT3uKnZ5qyh5m7wO4GSSYRF1grHvbz4Wq5VNBIGDUBbQambgL9fQrFS5n5ARMxQjhRAM0lfF2lJ10BajsA/G3c0owThF7mtvOdowZelvVY0OkWoJlWrECSGSOOmEbe8IuT3gC3GbGqZZg1x+e7P95PoMS2D/8wc61cGMUiFkItlNxaoqFqnIa50adKHY18oSiNy2JdnIFVbYwF+QqsFqATqyxYrtx8JofNV6h7i9BUpSUNYb2uFBYGNEoAqtfyKWPmP7hUyiG0w08wxO8GNEEZDJcs8Y3XXx3oglEtUvCKqfIbSH+J4DcaLOvjw+2ySa+HCQs5+FQEnELbjf3oOcPMieZtL7pPUdGL1EacIG6D4k0bnGs1tTwkz2rxtjrmi7nStCW6NY0orxdJnXizAm5sPtm1R4rtmksAMm+2dZoMwagTx8DNqkXM82/w1b12GUG08num7/98m57V4+cUyoaDDn/+jLhA0ScecLpWqOTDrVmLtmfwQH8BseJ1GMK7TIYwAAAABJRU5ErkJggg==)](https://microsoftedge.microsoft.com/addons/detail/magnet-linker/iagaihihgeloakmheonacpldkpogggen) ![Edge](https://img.shields.io/static/v1?label=users&message=7.6k&color=blue&style=plastic)

This is an extension for Chromium browsers and Firefox that extends magnet links on websites to enable the quick adding of torrents to Transmission via the RPC API.

Any magnet links found on a page are extended with a button displayed next to the link which sends that torrent straight to your Transmission instance.

Custom HTML can be added both before and after the button element based on a search of a websites URL, as well as adjustment of the div float on the button HTML.

# Getting started

[Extension on the Chrome web store](https://chrome.google.com/webstore/detail/magnet-linker/neokhcngmjnlbnphpfmiidlljbpffecd)

[Extension on the Microsoft Edge add-ons store](https://microsoftedge.microsoft.com/addons/detail/iagaihihgeloakmheonacpldkpogggen)

[Add-on on the Firefox add-ons store](https://addons.mozilla.org/en-GB/firefox/addon/magnet-linker/)

Once installed in your browser go to the options page and configure the extension.

## Change log

**Bug fix (V2.0.1)**
- Bug fix: Remove active tab permission from the manifest.

**New features (V2)**
- Allow storage of magnets to be disabled.
- Allow found magnets in storage to not disable injected buttons.
- Full rewrite including:
- Grunt added as a task runner and all external libs now added via npm.
- Fully consolidate chromium and firefox dists.

## API

Fill out the respective fields to build the URL that points to your Transmission API.

## Magnet search

You can configure how magnet links are found on web pages by adding attributes or element types to search for. There are currently 2 ways that elements are found in the DOM:

### by an element's attribute

For example **href** will find the magnet link in an element like:

```Magnet link```

### by an element's type

For example **code** will find the magnet link in an element like:

```magnet:?xt=urn:btih:d540fc48eb12f2833163eed6421d449dd8f1ce1f&dn=Ubuntu+desktop+19.04+%2864bit%29```

This kind of element searching is useful for searching on websites where magnet links are written out rather than linked, such as Reddit

## Customise injected HTML

On a site by site basis you can customise the HTML that surrounds the injected 'send to transmission' button, and also the float characteristics of the div. For example, on Zooqle it's worth setting the float
to none to better position the buttons on the page. The 'search' parameter must match all or part of the website's URL, so for Zooqle for example, just use 'zooqle'.

## Magnet storage

The extension has the option to store all magnets that have been sent to the transmission API so that when a page is loaded, buttons can be markes as 'already sent' for those links already added. Buttons can also be set to enable or disable when a corresponding magnet is founf in storage.

The Storage tab in options allows you to see all of these magnets and clear down the list if you choose.

## Create package
Uses grunt as a task runner, run the following from the root directory to build:

```
npm i
grunt release
```

The grunt release config executes a Powershell script to run web-ext, this can be changed to a bash file if preferred (see comments in the Gruntfile.js).

## Contribute
If you can make this extension better I'm happy for the help! Please create a pull request and get in touch. Alternatively feel free to raise an issue if you've found a bug or want to suggest a new feature.

To contribute, please create your PR to merge into the staging branch.


Buy Me a Coffee at ko-fi.com