1
0
Fork 0
mirror of https://github.com/Jackett/Jackett synced 2025-03-10 22:23:20 +00:00

webui: copy apikey to clipboard button (#12884)

This commit is contained in:
Salvatore Catroppa 2022-01-26 21:03:00 +01:00 committed by GitHub
parent d006150627
commit f84f492d43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View file

@ -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();

View file

@ -43,6 +43,9 @@
<div class="pull-right jackett-apikey">
<span class="input-header">API Key: </span>
<input id="api-key-input" class="form-control input-right" type="text" value="" placeholder="API Key" readonly="">
<button id="api-key-copy-button" title="Copy API Key to clipboard" class="btn btn-primary btn-xs">
<span class="glyphicon glyphicon-copy" aria-hidden="true"></span>
</button>
</div>
<hr />
@ -743,6 +746,6 @@
</script>
<script type="text/javascript" src="../libs/api.js?changed=2017083001"></script>
<script type="text/javascript" src="../custom.js?changed=2022012301"></script>
<script type="text/javascript" src="../custom.js?changed=2022012602"></script>
</body>
</html>