From 3b6b6721d989c2eec7ab0dc5a5a25cc95455806f Mon Sep 17 00:00:00 2001 From: gorhill Date: Sun, 20 Jul 2014 19:52:32 -0400 Subject: [PATCH] code review --- js/assets.js | 10 ++++------ js/background.js | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/js/assets.js b/js/assets.js index 8b2035c06..b9d732f83 100644 --- a/js/assets.js +++ b/js/assets.js @@ -411,12 +411,10 @@ var updateFromRemote = function(details, callback) { // - a github repo URL var getThirdpartyHomeURL = function() { // If it is a 3rd-party, look-up home server URL, if any. - if ( targetPath.indexOf('assets/thirdparties/') === 0 ) { - homeURL = targetPath.replace('assets/thirdparties/', ''); - if ( thirdpartyHomeURLs && thirdpartyHomeURLs[homeURL] ) { - homeURL = thirdpartyHomeURLs[homeURL]; - } else { - homeURL = 'http://' + homeURL; + if ( thirdpartyHomeURLs && targetPath.indexOf('assets/thirdparties/') === 0 ) { + var k = targetPath.replace('assets/thirdparties/', ''); + if ( thirdpartyHomeURLs[k] ) { + homeURL = thirdpartyHomeURLs[k]; } } // If there is a home server, disregard checksum: the file is assumed diff --git a/js/background.js b/js/background.js index e073a74ad..d99dedceb 100644 --- a/js/background.js +++ b/js/background.js @@ -44,7 +44,7 @@ return { }, updateAssetsEvery: 2 * 24 * 60 * 60 * 1000, - projectServerRoot: 'https://raw2.github.com/gorhill/ublock/master/', + projectServerRoot: 'https://raw.githubusercontent.com/gorhill/uBlock/master/', userFiltersPath: 'assets/user/filters.txt', // list of remote blacklist locations