mirror of
https://github.com/nkanaev/yarr.git
synced 2025-10-13 15:31:55 +00:00
youtube shorts in readability
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
- (new) serve on unix socket (thanks to @rvighne)
|
- (new) serve on unix socket (thanks to @rvighne)
|
||||||
- (new) more auto-refresh options: 12h & 24h (thanks to @aswerkljh for suggestion)
|
- (new) more auto-refresh options: 12h & 24h (thanks to @aswerkljh for suggestion)
|
||||||
- (fix) smooth scrolling on iOS (thanks to gatheraled)
|
- (fix) smooth scrolling on iOS (thanks to gatheraled)
|
||||||
|
- (fix) displaying youtube shorts in "Read Here" (thanks to @Dean-Corso for the report)
|
||||||
- (etc) theme-color support (thanks to @asimpson)
|
- (etc) theme-color support (thanks to @asimpson)
|
||||||
- (etc) cookie security measures (thanks to Tom Fitzhenry)
|
- (etc) cookie security measures (thanks to Tom Fitzhenry)
|
||||||
- (etc) restrict access to internal IPs for page crawler (thanks to Omar Kurt)
|
- (etc) restrict access to internal IPs for page crawler (thanks to Omar Kurt)
|
||||||
|
@@ -22,6 +22,8 @@ func VideoIFrame(link string) string {
|
|||||||
youtubeID := ""
|
youtubeID := ""
|
||||||
if l.Host == "www.youtube.com" && l.Path == "/watch" {
|
if l.Host == "www.youtube.com" && l.Path == "/watch" {
|
||||||
youtubeID = l.Query().Get("v")
|
youtubeID = l.Query().Get("v")
|
||||||
|
} else if l.Host == "www.youtube.com" && strings.HasPrefix(l.Path, "/shorts/") {
|
||||||
|
youtubeID = strings.TrimPrefix(l.Path, "/shorts/")
|
||||||
} else if l.Host == "youtu.be" {
|
} else if l.Host == "youtu.be" {
|
||||||
youtubeID = strings.TrimLeft(l.Path, "/")
|
youtubeID = strings.TrimLeft(l.Path, "/")
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user