Skip to content

Commit d1542bb

Browse files
committed
Repair some meta and relax detection a bit.
* Chromium 75.0.3770.90 started spewing this out and it's not in *mime-db* dep (yet?)... Relates to `/install/<username>/<scriptname>.meta.js`. Don't think it has an extension spec based off skimming doc * Relaxing is temporary atm in lieu of more aggressive re Post OpenUserJS#1633 OpenUserJS#1632 OpenUserJS#944 and applies to OpenUserJS#1548 OpenUserJS#432
1 parent aaf8c4c commit d1542bb

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

controllers/scriptStorage.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,15 @@ if (!mediaDB['image/jxr']) {
9292
});
9393
}
9494

95+
// Allow some Chromium based browsers to test
96+
if (!mediaDB['application/signed-exchange']) {
97+
mediaDB = _.extend(mediaDB, {
98+
'application/signed-exchange' : {
99+
source: 'google',
100+
extensions: []
101+
}
102+
});
103+
}
95104

96105
if (!mediaDB['*/*']) {
97106
mediaDB = _.extend(mediaDB, {'*/*' : { source: 'iana'}});
@@ -550,7 +559,7 @@ exports.sendScript = function (aReq, aRes, aNext) {
550559
let matches = null;
551560
let rAnyLocalMetaUrl = new RegExp(
552561
'^' + patternHasSameOrigin +
553-
'/(?:meta|install|src/scripts)/(.+?)/(.+?)\.meta\.js$'
562+
'/(?:meta|install|src/scripts)/(.+?)/(.+?)\.(?:meta|user)\.js$'
554563
);
555564
let hasAlternateLocalUpdateURL = false;
556565

libs/modelParser.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ var parseScript = function (aScript) {
233233
);
234234
var rAnyLocalMetaUrl = new RegExp(
235235
'^' + patternHasSameOrigin +
236-
'/(?:meta|install|src/scripts)/(.+?)/(.+?)\.meta\.js$'
236+
'/(?:meta|install|src/scripts)/(.+?)/(.+?)\.(?:meta|user)\.js$'
237237
);
238238

239239
var rSameOrigin = new RegExp(

0 commit comments

Comments
 (0)