| 
				
			 | 
			
			
				@@ -21,7 +21,7 @@ function getCurrentTabUrl(callback) { 
			 | 
		
	
		
			
			| 
				21
			 | 
			
				21
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				22
			 | 
			
				22
			 | 
			
			
				 // Redirect to mirror url 
			 | 
		
	
		
			
			| 
				23
			 | 
			
				23
			 | 
			
			
				 function takeMeTo(url) { 
			 | 
		
	
		
			
			| 
				24
			 | 
			
				
			 | 
			
			
				-	updateProperties = { 
			 | 
		
	
		
			
			| 
				
			 | 
			
				24
			 | 
			
			
				+	let updateProperties = { 
			 | 
		
	
		
			
			| 
				25
			 | 
			
				25
			 | 
			
			
				 			url: "https://" + url 
			 | 
		
	
		
			
			| 
				26
			 | 
			
				26
			 | 
			
			
				 	} 
			 | 
		
	
		
			
			| 
				27
			 | 
			
				27
			 | 
			
			
				 	chrome.tabs.update(updateProperties=updateProperties) 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -33,12 +33,14 @@ jQuery(document).ready(function() { 
			 | 
		
	
		
			
			| 
				33
			 | 
			
				33
			 | 
			
			
				 	// about it and the button to redirect to a random mirror (if there's more than 
			 | 
		
	
		
			
			| 
				34
			 | 
			
				34
			 | 
			
			
				 	// one). 
			 | 
		
	
		
			
			| 
				35
			 | 
			
				35
			 | 
			
			
				 	getCurrentTabUrl(function(url) { 
			 | 
		
	
		
			
			| 
				36
			 | 
			
				
			 | 
			
			
				-		chrome.storage.local.get("sites", function(sites){ 
			 | 
		
	
		
			
			| 
				37
			 | 
			
				
			 | 
			
			
				-			sites = sites.sites 
			 | 
		
	
		
			
			| 
				
			 | 
			
				36
			 | 
			
			
				+		chrome.storage.local.get("sites", function(localSites){ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				37
			 | 
			
			
				+			sites = localSites.sites 
			 | 
		
	
		
			
			| 
				38
			 | 
			
				38
			 | 
			
			
				 			// Grab the domain part of the URL 
			 | 
		
	
		
			
			| 
				39
			 | 
			
				
			 | 
			
			
				-			domain = url.match(/:\/\/(www\.)?([^\/]+)\//).slice(-1)[0] 
			 | 
		
	
		
			
			| 
				
			 | 
			
				39
			 | 
			
			
				+			let domain = url.match(/:\/\/(www\.)?([^\/]+)\//).slice(-1)[0] 
			 | 
		
	
		
			
			| 
				
			 | 
			
				40
			 | 
			
			
				+			console.log(domain); 
			 | 
		
	
		
			
			| 
				
			 | 
			
				41
			 | 
			
			
				+			console.log(sites); 
			 | 
		
	
		
			
			| 
				40
			 | 
			
				42
			 | 
			
			
				 			if(domain in sites) { 
			 | 
		
	
		
			
			| 
				41
			 | 
			
				
			 | 
			
			
				-				proxies = sites[domain] 
			 | 
		
	
		
			
			| 
				
			 | 
			
				43
			 | 
			
			
				+				let proxies = sites[domain] 
			 | 
		
	
		
			
			| 
				42
			 | 
			
				44
			 | 
			
			
				 				// Offer the user to redirect them to a mirror 
			 | 
		
	
		
			
			| 
				43
			 | 
			
				45
			 | 
			
			
				 				$("#mirror").css("display", "block") 
			 | 
		
	
		
			
			| 
				44
			 | 
			
				46
			 | 
			
			
				 				$("#nomirror").css("display", "none") 
			 |