From f84f492d4390cb5cab138f4500c5a7af8ab940d5 Mon Sep 17 00:00:00 2001 From: Salvatore Catroppa Date: Wed, 26 Jan 2022 21:03:00 +0100 Subject: [PATCH] webui: copy apikey to clipboard button (#12884) --- src/Jackett.Common/Content/custom.js | 7 +++++++ src/Jackett.Common/Content/index.html | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Jackett.Common/Content/custom.js b/src/Jackett.Common/Content/custom.js index 779f93284..c22607fcd 100644 --- a/src/Jackett.Common/Content/custom.js +++ b/src/Jackett.Common/Content/custom.js @@ -1367,6 +1367,13 @@ function bindUIButtons() { return false; }); + $('#api-key-copy-button').click(function () { + var apiKey = api.key; + if (apiKey !== null || apiKey !== undefined) { + copyToClipboard(apiKey); + } + }); + $('#jackett-add-indexer').click(function () { $("#modals").empty(); displayUnconfiguredIndexersList(); diff --git a/src/Jackett.Common/Content/index.html b/src/Jackett.Common/Content/index.html index 949acd0ac..c02f36fdf 100644 --- a/src/Jackett.Common/Content/index.html +++ b/src/Jackett.Common/Content/index.html @@ -43,6 +43,9 @@
API Key: +

@@ -743,6 +746,6 @@ - +