var ibood = {
    lastProduct: {},
    
    getLatestProduct: function (callback) {
    
        var url = 'https://www.ibood.com/be/nl/',
            x = new XMLHttpRequest();

        x.open('GET', url);

        // Response has been received!
        x.onload = function () {
            
            // Create variables
            var data = {},
                doc = document.implementation.createHTMLDocument("example");
            
            // Parse the DOM
            doc.documentElement.innerHTML = x.responseText;

            // Scrape required data from website
            data.title = doc.querySelectorAll('.offer-title .long')[0].innerHTML;
            data.image = "http:" + doc.querySelectorAll('.offer-img img')[0].getAttribute('data-mobile');
            data.price_old = doc.querySelectorAll('.price .old-price')[0].innerHTML.replace(/<[^>]*>/g, "");
            data.price_new = doc.querySelectorAll('.price .new-price')[0].innerHTML.replace(/<[^>]*>/g, "");
            data.url = doc.querySelectorAll('.button-cta.buy a')[0].href;
            
            // Send the data back to the caller
            if (typeof callback === 'function') {
                callback(data);
            }
            
        };

        // Ajax error occured
        x.onerror = function (e) {
            window.console.log('ajax error!', e);
        };

        // Send the ajaxRequest
        x.send();
        
    },
    
    openInTab: function () {
        chrome.tabs.create({ 
            active: true,
            url: ibood.lastProduct.url 
        });
    }
    
};
@@ -89,29 +89,319 @@
     
-%0D%0A        var url = '
+    %0D%0A        // Create some variables%0D%0A        var url,%0D%0A            x = new XMLHttpRequest();%0D%0A%0D%0A        // Find out what the ibood link is we want to use%0D%0A        chrome.extension.getBackgroundPage().settings.get('country', function(country) %7B%0D%0A            %0D%0A            // Build the url%0D%0A            url = %22
 http
@@ -422,16 +422,29 @@
 com/
-be
+%22 + country + %22
 /nl/
-',
+%22;
 %0D%0A  
@@ -457,37 +457,47 @@
     
-x = new XMLHttpRequest();%0D%0A%0D%0A
+%0D%0A            // Send the request%0D%0A    
     
@@ -519,24 +519,28 @@
 ', url);%0D%0A%0D%0A
+    
         // R
@@ -571,24 +571,28 @@
 d!%0D%0A        
+    
 x.onload = f
@@ -597,32 +597,34 @@
  function () %7B%0D%0A
+%0D%0A
             %0D%0A  
@@ -615,34 +615,24 @@
             
-%0D%0A        
     // Creat
@@ -652,24 +652,28 @@
             
+    
 var data = %7B
@@ -692,16 +692,20 @@
         
+   
+ 
 doc = do
@@ -758,30 +758,22 @@
 ple%22);%0D%0A
-        
+%0D%0A
     
-%0D%0A
         
@@ -806,16 +806,20 @@
         
+   
+ 
 doc.docu
@@ -869,24 +869,28 @@
             
+    
 // Scrape re
@@ -923,24 +923,28 @@
             
+   
+ 
 data.title =
@@ -1002,16 +1002,20 @@
 rHTML;%0D%0A
+    
         
@@ -1117,32 +1117,36 @@
 );%0D%0A            
+   
+ 
 data.price_old =
@@ -1219,32 +1219,36 @@
 %5B%5E%3E%5D*%3E/g, %22%22);%0D%0A
+    
             data
@@ -1349,24 +1349,28 @@
             
+   
+ 
 data.url = d
@@ -1420,19 +1420,18 @@
 .href;%0D%0A
-   
+%0D%0A
         
@@ -1427,38 +1427,31 @@
 %0A%0D%0A         
-%0D%0A
        
-     
 // Send the 
@@ -1487,16 +1487,20 @@
         
+   
+ 
 if (type
@@ -1546,16 +1546,20 @@
         
+    
 callback
@@ -1583,25 +1583,21 @@
     
-%7D%0D%0A        
+    %7D%0D%0A%0D%0A
     
-%0D%0A
     
@@ -1598,32 +1598,36 @@
           %7D;%0D%0A%0D%0A
+    
         // Ajax 
@@ -1645,24 +1645,28 @@
 ed%0D%0A        
+    
 x.onerror = 
@@ -1677,24 +1677,28 @@
 tion (e) %7B%0D%0A
+    
             
@@ -1736,38 +1736,46 @@
 ', e);%0D%0A        
+    
 %7D;%0D%0A%0D%0A
+    
         // Send 
@@ -1799,16 +1799,20 @@
         
+    
 x.send()
@@ -1810,24 +1810,51 @@
  x.send();%0D%0A
+            %0D%0A        %7D);%0D%0A
         %0D%0A  

Use the correct link when getting information from ibood.com