Merge pull request #50 from PR0M3TH3AN/codex/add-explanatory-comments-in-javascript-files

Document intentional post-parsing data-play assignments
This commit is contained in:
thePR0M3TH3AN
2025-09-24 16:06:04 -04:00
committed by GitHub
2 changed files with 6 additions and 0 deletions

View File

@@ -382,6 +382,9 @@ async function loadUserVideos(pubkey) {
</div>
`;
// Leave the data-play-* attributes empty in the template markup so the raw
// URL/magnet strings can be assigned after parsing without HTML entity
// escaping, keeping this renderer consistent with app.js.
const interactiveEls = cardEl.querySelectorAll("[data-video-id]");
interactiveEls.forEach((el) => {
if (!el.dataset) return;

View File

@@ -400,6 +400,9 @@ class SubscriptionsManager {
t.innerHTML = cardHtml.trim();
const cardEl = t.content.firstElementChild;
if (cardEl) {
// Leave the data-play-* attributes empty in the literal markup so we can
// assign the raw URL/magnet strings post-parsing without HTML entity
// escaping, mirroring the approach in app.js.
const interactiveEls = cardEl.querySelectorAll("[data-video-id]");
interactiveEls.forEach((el) => {
if (!el.dataset) return;