Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
javascript(或其他)有没有办法在浏览器不失去焦点的情况下处理磁力链接?这有点像在后台打开一个标签而不离开当前页面。
我最近遇到了类似的问题,并且能够通过在页面上创建一个命名框架并将其用作目标来解决它window.open:
window.open
<iframe style="display:none" name="magnetframe"></iframe> window.open(magnet_uri, 'magnetframe')
使用 chrome API 的另一种解决方案。
chrome.tabs.update({url:magnet_uri});