mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-03-15 15:52:00 +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>
|
</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]");
|
const interactiveEls = cardEl.querySelectorAll("[data-video-id]");
|
||||||
interactiveEls.forEach((el) => {
|
interactiveEls.forEach((el) => {
|
||||||
if (!el.dataset) return;
|
if (!el.dataset) return;
|
||||||
|
|||||||
@@ -400,6 +400,9 @@ class SubscriptionsManager {
|
|||||||
t.innerHTML = cardHtml.trim();
|
t.innerHTML = cardHtml.trim();
|
||||||
const cardEl = t.content.firstElementChild;
|
const cardEl = t.content.firstElementChild;
|
||||||
if (cardEl) {
|
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]");
|
const interactiveEls = cardEl.querySelectorAll("[data-video-id]");
|
||||||
interactiveEls.forEach((el) => {
|
interactiveEls.forEach((el) => {
|
||||||
if (!el.dataset) return;
|
if (!el.dataset) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user