From fffa4ef64c7cabe3fe1010bbfec4e5f3a7d7842c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=88=9A=28noham=29=C2=B2?= <100566912+NohamR@users.noreply.github.com> Date: Tue, 23 Dec 2025 23:11:50 +0100 Subject: [PATCH] Open torrent download links in new tab --- contentScripts/addTorrent/addTorrent.js | 1 + contentScripts/search/search.js | 1 + 2 files changed, 2 insertions(+) diff --git a/contentScripts/addTorrent/addTorrent.js b/contentScripts/addTorrent/addTorrent.js index bb678ae..9b624dc 100644 --- a/contentScripts/addTorrent/addTorrent.js +++ b/contentScripts/addTorrent/addTorrent.js @@ -50,6 +50,7 @@ var discordWebhookUrl, discordUserName, categories; chrome.storage.sync.get(['yggToken', 'discordWebhookUrl', 'discordUserName', 'displayDiscord', 'displayAddCategories', 'categories', 'defaultCategories'], function (value) { if (value.yggToken) { downloadButton.setAttribute('href', `https://yggapi.eu/torrent/${torrentId}/download?passkey=${value.yggToken}`); + downloadButton.setAttribute('target', '_blank'); } else { var alertYggToken = ''; if (document.readyState !== 'complete') { diff --git a/contentScripts/search/search.js b/contentScripts/search/search.js index c6214db..8dd70ac 100644 --- a/contentScripts/search/search.js +++ b/contentScripts/search/search.js @@ -16,6 +16,7 @@ chrome.storage.sync.get(['yggToken'], function (value) { downloadIcon.setAttribute('src', chrome.runtime.getURL("img/download.png")); downloadButton.appendChild(downloadIcon); downloadButton.setAttribute('href', "https://yggapi.eu/torrent/" + torrentId + "/download?passkey=" + value.yggToken); + downloadButton.setAttribute('target', '_blank'); cell.appendChild(downloadButton); } }