I have a javascript file filled with functions that changes the url of an element when a button is clicked like this:
function ABBA(element){
document.getElementById("link1").href="https://www.youtube-nocookie.com/embed/playlist?list=PLTrnXQx3tvG9dkC_I0h-AzV5Su6YG2k9G";
document.getElementById("link2").href="https://www.youtube-nocookie.com/embed/playlist?list=OLAK5uy_kFZ1F___4Iw3JsDoNzF4bWWJCJ5EeVZAE";
document.getElementById("link3").href="https://www.youtube-nocookie.com/embed/playlist?list=OLAK5uy_kFZ1F___4Iw3JsDoNzF4bWWJCJ5EeVZAE";
}
function ABC(element){
document.getElementById("link1").href="https://www.youtube-nocookie.com/embed/playlist?list=PLTrnXQx3tvG9dkC_I0h-AzV5Su6YG2k9G";
document.getElementById("link2").href="https://www.youtube-nocookie.com/embed/playlist?list=OLAK5uy_kFZ1F___4Iw3JsDoNzF4bWWJCJ5EeVZAE";
document.getElementById("link3").href="https://www.youtube-nocookie.com/embed/playlist?list=OLAK5uy_kFZ1F___4Iw3JsDoNzF4bWWJCJ5EeVZAE";
}
// etc etc
My question is, is there a way to collect all those .href
strings and save it to a variable, without executing the functions?