Skip to content

Commit 16a7f34

Browse files
committed
youtube shorts in readability
1 parent 0e11cec commit 16a7f34

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

doc/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- (new) serve on unix socket (thanks to @rvighne)
44
- (new) more auto-refresh options: 12h & 24h (thanks to @aswerkljh for suggestion)
55
- (fix) smooth scrolling on iOS (thanks to gatheraled)
6+
- (fix) displaying youtube shorts in "Read Here" (thanks to @Dean-Corso for the report)
67
- (etc) theme-color support (thanks to @asimpson)
78
- (etc) cookie security measures (thanks to Tom Fitzhenry)
89
- (etc) restrict access to internal IPs for page crawler (thanks to Omar Kurt)

src/content/silo/iframe.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ func VideoIFrame(link string) string {
2222
youtubeID := ""
2323
if l.Host == "www.youtube.com" && l.Path == "/watch" {
2424
youtubeID = l.Query().Get("v")
25+
} else if l.Host == "www.youtube.com" && strings.HasPrefix(l.Path, "/shorts/") {
26+
youtubeID = strings.TrimPrefix(l.Path, "/shorts/")
2527
} else if l.Host == "youtu.be" {
2628
youtubeID = strings.TrimLeft(l.Path, "/")
2729
}

0 commit comments

Comments
 (0)