Skip to content

Commit e41905f

Browse files
authored
Update manifest.js
1 parent 5373eff commit e41905f

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

manifest.js

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,6 @@
11

22
// dynamic manifest
33

4-
5-
function generateFileExtensionsFor(types) {
6-
7-
let output = [];
8-
9-
types.forEach(type => {
10-
11-
const extensions = fileTypes[type];
12-
13-
extensions.map(fileType => { output.push('.' + fileType) });
14-
15-
});
16-
17-
return output;
18-
19-
}
20-
21-
const manifestExtensions = generateFileExtensionsFor(['css', 'javascript', 'html', 'json', 'markdown', 'python']);
22-
23-
244
let manifest = {
255
"name": "Codeit",
266
"short_name": "Codeit",
@@ -45,7 +25,7 @@ let manifest = {
4525
"action": window.location.origin + "/full?upload=true",
4626
"name": "code",
4727
"accept": {
48-
"text/plain": manifestExtensions
28+
"text/plain": ["text/*", "application/json"]
4929
}
5030
}
5131
],
@@ -57,7 +37,7 @@ let manifest = {
5737
"files": [
5838
{
5939
"name": "code",
60-
"accept": manifestExtensions
40+
"accept": ["text/*", "application/json"]
6141
}
6242
]
6343
}

0 commit comments

Comments
 (0)