File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
assets/hb/modules/socials/js
layouts/partials/hb/modules/socials Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 1+ export const isSafari = ( ) : boolean => {
2+ const ua = navigator . userAgent . toLowerCase ( ) ;
3+ return ua . indexOf ( "safari" ) !== - 1 && ua . indexOf ( "chrome" ) === - 1 ;
4+ } ;
5+
6+ ( ( ) => {
7+ if ( isSafari ( ) ) {
8+ document
9+ . querySelectorAll < HTMLLinkElement > ( "a[data-rss-feed]" )
10+ . forEach ( ( link ) => {
11+ link . href = "feed:" + link . href ;
12+ } ) ;
13+ }
14+ } ) ( )
Original file line number Diff line number Diff line change 6363 {{- $url = printf .url $.id }}
6464 {{- else if eq $.name "rss" }}
6565 {{- with site.Home.OutputFormats.Get "rss" }}
66- {{- $url = .Permalink | printf "feed:%s" }}
66+ {{- $url = .Permalink }}
6767 {{- end }}
6868 {{- end }}
6969 {{- end }}
8484 {{ printf `href ="%s "` $url | safeHTMLAttr }}
8585 target ="_blank "
8686 rel ="nofollow me "
87+ {{ if eq .name "rss" }}data-rss-feed{{ end }}
8788 title="{{ $title }} ">
8889 {{- partial "icons/icon" (dict
8990 "vendor" $iconVendor
You can’t perform that action at this time.
0 commit comments