about summary refs log tree commit diff stats
path: root/src/local/pager.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/local/pager.nim')
-rw-r--r--src/local/pager.nim6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/local/pager.nim b/src/local/pager.nim
index b8041236..5bd51fed 100644
--- a/src/local/pager.nim
+++ b/src/local/pager.nim
@@ -42,6 +42,7 @@ import types/cookie
 import types/opt
 import types/url
 import types/winattrs
+import utils/mimeguess
 import utils/strwidth
 import utils/twtstr
 
@@ -1603,7 +1604,10 @@ proc connected(pager: Pager; container: Container; response: Response) =
     container.contentType.get & ";charset=" & $container.charset
   let mailcapRes = pager.checkMailcap(container, istream, response.outputId,
     realContentType)
-  if not mailcapRes.found and not realContentType.startsWithIgnoreCase("text/"):
+  let shortContentType = container.contentType.get
+  if not mailcapRes.found and
+      not shortContentType.startsWithIgnoreCase("text/") and
+      not shortContentType.isJavaScriptType():
     pager.askDownloadPath(container, response)
     return
   if mailcapRes.connect:
id=d7e17087ed2fc5eed57efa03e81460e3e41f7238'>^
1076f2b




650a1fb ^
01a8d44 ^
650a1fb ^
1076f2b
650a1fb ^
1076f2b
650a1fb ^
1076f2b

650a1fb ^
1076f2b
650a1fb ^
1076f2b



650a1fb ^
44f2e8b ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40