aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--client/src/app/+videos/+video-watch/shared/timestamp-route-transformer.directive.ts4
-rw-r--r--client/src/app/core/renderer/markdown.service.ts2
2 files changed, 3 insertions, 3 deletions
diff --git a/client/src/app/+videos/+video-watch/shared/timestamp-route-transformer.directive.ts b/client/src/app/+videos/+video-watch/shared/timestamp-route-transformer.directive.ts
index 91fe5bf5d..ef9f5a59f 100644
--- a/client/src/app/+videos/+video-watch/shared/timestamp-route-transformer.directive.ts
+++ b/client/src/app/+videos/+video-watch/shared/timestamp-route-transformer.directive.ts
@@ -11,13 +11,11 @@ export class TimestampRouteTransformerDirective {
11 const target = $event.target as HTMLLinkElement 11 const target = $event.target as HTMLLinkElement
12 12
13 if (target.hasAttribute('href') !== true) return 13 if (target.hasAttribute('href') !== true) return
14 if (!target.classList.contains('video-timestamp')) return
14 15
15 const ngxLink = document.createElement('a') 16 const ngxLink = document.createElement('a')
16 ngxLink.href = target.getAttribute('href') 17 ngxLink.href = target.getAttribute('href')
17 18
18 // we only care about reflective links
19 if (ngxLink.host !== window.location.host) return
20
21 const ngxLinkParams = new URLSearchParams(ngxLink.search) 19 const ngxLinkParams = new URLSearchParams(ngxLink.search)
22 if (ngxLinkParams.has('start') !== true) return 20 if (ngxLinkParams.has('start') !== true) return
23 21
diff --git a/client/src/app/core/renderer/markdown.service.ts b/client/src/app/core/renderer/markdown.service.ts
index a81d99534..42e8c4a88 100644
--- a/client/src/app/core/renderer/markdown.service.ts
+++ b/client/src/app/core/renderer/markdown.service.ts
@@ -90,6 +90,8 @@ export class MarkdownService {
90 url: buildVideoLink({ shortUUID: videoShortUUID }), 90 url: buildVideoLink({ shortUUID: videoShortUUID }),
91 startTime: t 91 startTime: t
92 }) 92 })
93
94 // Sync class name with timestamp-route-transformer directive
93 return `<a class="video-timestamp" href="${url}">${str}</a>` 95 return `<a class="video-timestamp" href="${url}">${str}</a>`
94 }) 96 })
95 } 97 }