Mineplex2018-withcommit/Plugins/Mineplex.ChatSnapManager/web/main.js

19 lines
531 B
JavaScript
Raw Normal View History

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));
}