mirror of
https://github.com/gavvvr/obsidian-timecodes-plugin.git
synced 2026-07-22 05:38:08 +00:00
fix: add small delay to wait for HTMLMediaElement to become available in Markdown view
This commit is contained in:
parent
085d6163c5
commit
28068f4933
1 changed files with 8 additions and 2 deletions
|
|
@ -1,9 +1,15 @@
|
|||
import { Plugin } from 'obsidian'
|
||||
import { MarkdownPostProcessorContext, Plugin } from 'obsidian'
|
||||
|
||||
import { turnRawTimecodesIntoClickableLinks } from './ui/timecodes-md-post-processor'
|
||||
|
||||
export default class TimecodesPlugin extends Plugin {
|
||||
override onload() {
|
||||
this.registerMarkdownPostProcessor(turnRawTimecodesIntoClickableLinks)
|
||||
this.registerMarkdownPostProcessor(
|
||||
(root: HTMLElement, ctx: MarkdownPostProcessorContext) => {
|
||||
requestAnimationFrame(() => {
|
||||
turnRawTimecodesIntoClickableLinks(root, ctx)
|
||||
})
|
||||
},
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue