Verified Commit 696b45de authored by Chocobozzz's avatar Chocobozzz
Browse files

Fix timestamp click

parent d7b052ff
......@@ -11,13 +11,11 @@ export class TimestampRouteTransformerDirective {
const target = $event.target as HTMLLinkElement
if (target.hasAttribute('href') !== true) return
if (!target.classList.contains('video-timestamp')) return
const ngxLink = document.createElement('a')
ngxLink.href = target.getAttribute('href')
// we only care about reflective links
if (ngxLink.host !== window.location.host) return
const ngxLinkParams = new URLSearchParams(ngxLink.search)
if (ngxLinkParams.has('start') !== true) return
......
......@@ -90,6 +90,8 @@ export class MarkdownService {
url: buildVideoLink({ shortUUID: videoShortUUID }),
startTime: t
})
// Sync class name with timestamp-route-transformer directive
return `<a class="video-timestamp" href="${url}">${str}</a>`
})
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment