Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open magnet link without losing focus

Is there a way in javascript (or other) to handle a magnet link without the browser losing the focus? It'd be a little like opening a tab in the background without leaving the current page.

like image 203
Sheraff Avatar asked Jan 31 '26 03:01

Sheraff


1 Answers

I recently had a similar problem, and was able to solve it by creating a named frame on the page and using it as the target for window.open:

<iframe style="display:none" name="magnetframe"></iframe>

window.open(magnet_uri, 'magnetframe')
like image 162
user3046479 Avatar answered Feb 01 '26 17:02

user3046479