function runAlarm() {
    chrome.tabs.create({
        url: "http://example.com"
    });
}
chrome.alarms.onAlarm.addListener(function(alarm) {
    console.log(alarm);
    chrome.tabs.query({}, function(tabs) {
        if (tabs.length === 0) {
            chrome.storage.local.set({
                "missed": 1
            });
        } else {
            runAlarm();
        }
    });
});
chrome.windows.onCreated.addListener(function(window) {
    chrome.storage.local.get("missed", function(r) {
        if (r.missed === 1) {
            chrome.storage.local.set({
                "missed": 0
            });
            runAlarm();
        }
    });
});
chrome.runtime.onInstalled.addListener(function(details) {
    chrome.storage.local.get("enabled", function(r) {
        if (r.enabled === undefined) {
            chrome.storage.local.set({
                "sites": [],
                "time": "08:00",
                "enabled": false,
                "missed": 0
            });
        }
    });
});

@@ -11,24 +11,135 @@
 unAlarm() %7B%0A
+    chrome.storage.local.get(%22sites%22, function(r) %7B%0A        for (var i = 0; i %3C r.sites.length; i++) %7B%0A        
     chrome.t
@@ -151,16 +151,24 @@
 reate(%7B%0A
+        
         
@@ -176,28 +176,44 @@
 rl: 
-%22http://example.com%22
+r.sites%5Bi%5D%0A            %7D);%0A        %7D
 %0A   

Add opening saved sites