Skip to content

Commit d289c86

Browse files
authored
Merge pull request #24 from solid/jeff-zucker-patch-support-minting-javascript
Support minting new javascript resources
2 parents 72eaaf3 + 3616bc9 commit d289c86

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sourcePane.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ module.exports = {
2121
if (t.startsWith(prefix)) return 'Source'
2222
if (t.includes('xml')) return 'XML Source'
2323
if (t.includes('json')) return 'JSON Source' // Like eg application/ld+json
24+
if (t.includes('javascript')) return 'Javascript Source';
2425
}
2526
return null
2627
},
@@ -42,7 +43,7 @@ module.exports = {
4243
const contentType = mime.lookup(newInstance.uri)
4344
if (
4445
!contentType ||
45-
!(contentType.startsWith('text') || contentType.includes('xml') || contentType.includes('json'))
46+
!(contentType.startsWith('text') || contentType.includes('xml') || contentType.includes('json') || contentType.includes('javascript')
4647
) {
4748
const msg =
4849
'A new text file has to have an file extension like .txt .ttl .json etc.'

0 commit comments

Comments
 (0)