Skip to content

Commit

Permalink
fix timestamp not being properly concatenated
Browse files Browse the repository at this point in the history
  • Loading branch information
blackforestboi committed Mar 27, 2024
1 parent 9bd7bdf commit 3ab9a43
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion external/@worldbrain/memex-common
3 changes: 2 additions & 1 deletion src/annotations/components/AnnotationCreate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,14 @@ export class AnnotationCreate extends React.Component<Props, State>
const youtubeSummariseEvents = this.props.sidebarEvents
youtubeSummariseEvents.on(
'triggerYoutubeTimestampSummary',
({ text, showLoadingSpinner }, callback) => {
async ({ text, showLoadingSpinner }, callback) => {
if (!this.editor) {
callback(false) // signal that listener isn't ready
return
}

if (text) {
await sleepPromise(50)
this.editor?.addYoutubeTimestampWithText(
text,
showLoadingSpinner,
Expand Down
2 changes: 1 addition & 1 deletion src/search-injection/components/youtubeActionBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export default class YoutubeButtonMenu extends React.Component<Props, State> {
} else {
let video = document.getElementsByTagName('video')[0]
if (video) {
let currentTime = video.currentTime
let currentTime = Math.floor(video.currentTime)
const currentTimeStamp = this.createTimestampAndURL(
currentUrl,
currentTime,
Expand Down

0 comments on commit 3ab9a43

Please sign in to comment.