|
@@ -1,9 +1,8 @@
|
1
|
|
-sites_url = "sites.json"
|
|
1
|
+sites_url = "https://raw.githubusercontent.com/babolivier/collateral-freedom/master/sites.json"
|
2
|
2
|
sites = {}
|
3
|
3
|
|
4
|
4
|
function getSitesAndMirrors() {
|
5
|
|
- $.getJSON("http://host.brendanabolivier.com/files/56bf24564ab24.json")
|
6
|
|
- .done(function(data) { chrome.storage.local.set({"sites": data}) })
|
|
5
|
+ $.getJSON(sites_url).done(function(data) { chrome.storage.local.set({"sites": data}) })
|
7
|
6
|
}
|
8
|
7
|
|
9
|
8
|
function getCurrentTabUrl(callback) {
|
|
@@ -49,7 +48,7 @@ function updateTab() {
|
49
|
48
|
getCurrentTabUrl(function(url) {
|
50
|
49
|
chrome.storage.local.get("sites", function(sites){
|
51
|
50
|
sites = sites.sites
|
52
|
|
- if(url.match(/:\/\/(.+)\//)[1] in sites) {
|
|
51
|
+ if(url.match(/:\/\/([^\/]+)\//)[1] in sites) {
|
53
|
52
|
chrome.browserAction.setIcon({path: 'icon-red.png'})
|
54
|
53
|
}
|
55
|
54
|
else {
|