mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-03-14 23:07:30 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user