Converts timestamps within a post, to timestamp hyperlinks to the post's (otherwise the topic's) associated YouTube video.
Uses extract-timestamp for the heavy lifting.
- https://discuss.bevry.me/t/maps-of-meaning-9/31/2?u=balupton (has things like
5:1
,11:1
that are correctly not timestamped) - https://discuss.bevry.me/t/maps-of-meaning-8/30/2?u=balupton (has a link to a referenced youtube video inside the notes, hence usage of
# my notes for [associated youtube video](...)
to make sure correct youtube video is associated) - https://discuss.bevry.me/t/ep-4-awakening-from-the-meaning-crisis-socrates-and-the-quest-for-wisdom/832/3?u=balupton (standard, associated to topic youtube video)
To prevent false positives (when the format of a timestamp is used for something that isn't timestamp related), the following format requirements apply:
- Timestamps must be in a post that contains
my notes
- Timestamps must be in the format of
timestamp -
ortimestamp —
If anyone can comment or pull request on how to make these requirements customisable, let me know.
Browser requirements:
- Tested and supported in Safari and Google Chrome
- Firefox is not supported, as it lacks support for named capture groups for regular expressions, which is what the underlying extract-timestamp library depends upon.
- Go to https://discuss.bevry.me/admin/customize/themes
- Click
Install
button on the right - Click
From a git repository
- Enter
https://github.com/bevry/discourse-component-youtubetimestamps
- Click
Install
button inside the modal
Unless stated otherwise all works are:
- Copyright © 2020+ Benjamin Lupton
and licensed under: