Last active
May 8, 2023 19:14
-
-
Save Berny23/8a4aab8260041ed213e2ee2951f622ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Kopieren des aktuellen Namens, wenn Master-Button geklickt wird. | |
// Muss nur einmal ausgeführt werden, sobald auf den Reiter "Sammeln" geklickt wurde. | |
var lastName = getCurrentSetName(); | |
$('select#setauswahl').on('change', function() { | |
lastName = getCurrentSetName(); | |
console.log(lastName); | |
//setTimeout(async() => await navigator.clipboard.writeText(finalName), 3000); | |
}); | |
$('.sammelalbum-set > .btn-success').on('click', function() { | |
console.log(lastName); | |
navigator.clipboard.writeText(lastName); | |
lastName = getCurrentSetName(); | |
console.log(lastName); | |
}); | |
function getCurrentSetName () { | |
let name = $('.sammelalbum-set:visible > .btn').closest('.sammelalbum-set').attr('id').split('set-')[1]; | |
return name[0].toUpperCase() + name.slice(1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment