Skip to content

Commit

Permalink
Repair some meta and relax detection a bit.
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Martii committed Jul 2, 2019
1 parent aaf8c4c commit d1542bb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion controllers/scriptStorage.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ if (!mediaDB['image/jxr']) {
});
}

// Allow some Chromium based browsers to test
if (!mediaDB['application/signed-exchange']) {
mediaDB = _.extend(mediaDB, {
'application/signed-exchange' : {
source: 'google',
extensions: []
}
});
}

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

Expand Down
2 changes: 1 addition & 1 deletion libs/modelParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ var parseScript = function (aScript) {
);
var rAnyLocalMetaUrl = new RegExp(
'^' + patternHasSameOrigin +
'/(?:meta|install|src/scripts)/(.+?)/(.+?)\.meta\.js$'
'/(?:meta|install|src/scripts)/(.+?)/(.+?)\.(?:meta|user)\.js$'
);

var rSameOrigin = new RegExp(
Expand Down

0 comments on commit d1542bb

Please sign in to comment.