Skip to content

Commit

Permalink
Any hiloulot starting with the string http should be an a link
Browse files Browse the repository at this point in the history
  • Loading branch information
NightScript370 committed Dec 25, 2024
1 parent 1c5f35e commit 77b9e51
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions assets/js/zmanimListUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -1164,10 +1164,14 @@ class zmanimListUpdater {

const name = document.createElement("b");
name.appendChild(document.createTextNode(neshama.name));

li.appendChild(name)
if (neshama.src)
li.appendChild(document.createTextNode(` (${neshama.src})`));

if (neshama.src) {
if (neshama.src.startsWith('http'))
li.innerHTML += ` (<a href="${neshama.src}">${new URL(neshama.src).hostname}</a>)`
else
li.appendChild(document.createTextNode(` (${neshama.src})`));
}

leilouNishmatList.appendChild(li);
}
Expand Down

0 comments on commit 77b9e51

Please sign in to comment.