2015-12-09 21:05:24 +01:00
|
|
|
const TAG_UUID = "data-player-uuid";
|
|
|
|
|
|
|
|
var elements = document.querySelectorAll('[' + TAG_UUID + ']'); // NodeList type
|
|
|
|
|
|
|
|
for (var i = 0; i < elements.length; i++)
|
|
|
|
{
|
|
|
|
var element = elements.item(i);
|
|
|
|
|
|
|
|
// TODO: This is temporary, hopefully we'll have a better solution, some sort of hover tooltip
|
|
|
|
element.addEventListener("click", (function(element)
|
|
|
|
{
|
|
|
|
return function(e)
|
|
|
|
{
|
|
|
|
var uuid = element.getAttribute("data-player-uuid");
|
|
|
|
alert("UUID: " + uuid);
|
|
|
|
}
|
|
|
|
})(element));
|
|
|
|
|
|
|
|
}
|