Skip to content

Commit

Permalink
[markerDeleteButton] Update comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
WeedLordVegeta420 committed Aug 7, 2024
1 parent 1bdb45c commit c15c164
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/markerDeleteButton/markerDeleteButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@
document
.querySelectorAll("div.wall-item-container")
.forEach(function (node) {
// Insert delete button.
var deleteButton = document.createElement("div");
deleteButton.innerHTML = markerDeleteButton;
node.prepend(deleteButton);

// Parse marker ID.
var markerImg = node
.querySelector(".wall-item-media")
.getAttribute("src");
var markerID = markerImg.split("/")[6];

// Register click handler.
deleteButton.addEventListener("click", function (e) {
deleteMarker(markerID);
});
Expand All @@ -29,7 +32,7 @@
});
}

// Wait for video player to load on scene page.
// Wait for markers page to load.
csLib.PathElementListener(
"/scenes/markers",
"div.wall",
Expand Down

0 comments on commit c15c164

Please sign in to comment.