Skip to content

Commit

Permalink
Properly set http(s) and ".meta.js" for US.o updateUrls.
Browse files Browse the repository at this point in the history
Refs #1474
  • Loading branch information
Anthony Lieuallen committed Dec 9, 2011
1 parent ecbde9d commit a1a47a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/script.js
Expand Up @@ -177,10 +177,10 @@ function Script_setUpdateURL(url) {
this._updateURL = url;
// US.o gets special treatment for being so large
var usoMatch = url.match(
/^https?:\/\/userscripts.org\/scripts\/\w+\/(\d+).*\.user\.js/);
/^(https?:\/\/)userscripts.org\/scripts\/\w+\/(\d+).*\.user\.js/);
if (usoMatch) {
this._updateURL = 'http://userscripts.org/scripts/source/'
+ usoMatch[1] + '.user.js';
this._updateURL = usoMatch[1] + 'userscripts.org/scripts/source/'
+ usoMatch[2] + '.meta.js';
}
});

Expand Down

0 comments on commit a1a47a9

Please sign in to comment.