We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ec275b8 + bbbcf70 commit 6524132Copy full SHA for 6524132
layouts/_default/baseof.html
@@ -34,8 +34,9 @@
34
{{ if eq "home" .Kind -}}
35
/* Replace the download link if a Windows browser was detected */
36
try {
37
- var href = $('.version > a')[0].href.match(/^(.*\/)tag(\/.*)$/);
38
- var version = $('.version > a')[0].title.match(/^Version ([0-9.]*)(\(([0-9]*)?\))?/);
+ var a = document.querySelector('.version > a')
+ var href = a?.href.match(/^(.*\/)tag(\/.*)$/);
39
+ var version = a?.title.match(/^Version ([0-9.]*)(\(([0-9]*)?\))?/);
40
if (!href || !version || !navigator.userAgentData)
41
throw 0;
42
0 commit comments