Skip to content

Commit 0c08c33

Browse files
committed
Added the same functionality to jump to the video timestamp for a transcript as for timestamps
1 parent 31c4267 commit 0c08c33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_layouts/podcast.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ <h2 id="transcript-heading" class="sr-only">Transcript</h2>
409409
{% if line.header %}
410410
<h3 id="{{ line.header | slugify }}" class="transcript-header">{{ line.header }}</h3>
411411
{% else %}
412-
<p class="transcript-line"><b>{{ line.who }}</b>: {{ line.line }}{% if line.sec %} (<a href="{{ page.links.youtube }}&t={{ line.sec }}s" target="youtube">{{ line.time }}</a>){% endif %}</p>
412+
<p class="transcript-line"><b>{{ line.who }}</b>: {{ line.line }}{% if line.sec %} (<a href="#" class="transcript-timestamp-link" data-time="{{ line.sec }}">{{ line.time }}</a>){% endif %}</p>
413413
{% endif %}
414414
{% endfor %}
415415
</div>
@@ -573,7 +573,7 @@ <h3 class="related-episode-title">{{ episode.title }}</h3>
573573
});
574574

575575
// Timestamp click functionality
576-
const timestampLinks = document.querySelectorAll('.timestamp-link');
576+
const timestampLinks = document.querySelectorAll('.timestamp-link, .transcript-timestamp-link');
577577
timestampLinks.forEach(link => {
578578
link.addEventListener('click', function(e) {
579579
e.preventDefault();

0 commit comments

Comments
 (0)