mirror of
https://github.com/gavvvr/obsidian-timecodes-plugin.git
synced 2026-07-22 12:00:24 +00:00
15 lines
460 B
TypeScript
15 lines
460 B
TypeScript
import { MarkdownPostProcessorContext, Plugin } from 'obsidian'
|
|
|
|
import { turnRawTimecodesIntoClickableLinks } from './ui/timecodes-md-post-processor'
|
|
|
|
export default class TimecodesPlugin extends Plugin {
|
|
override onload() {
|
|
this.registerMarkdownPostProcessor(
|
|
(root: HTMLElement, ctx: MarkdownPostProcessorContext) => {
|
|
requestAnimationFrame(() => {
|
|
turnRawTimecodesIntoClickableLinks(root, ctx)
|
|
})
|
|
},
|
|
)
|
|
}
|
|
}
|