 
     var timer : NSTimer!
     var backgroundTimer : NSTimer!
+    var backgroundTimer2 : NSTimer!
+    var lastBackgroundRefreshTime : CFTimeInterval!
     var activatedFromBackground = false
     var isFullscreen = false
 

        websiteDataStore.fetchDataRecordsOfTypes(dataTypes, completionHandler: { records in
        self.websiteDataStore.removeDataOfTypes(dataTypes, forDataRecords: records, completionHandler: {
                self.webView.reload()
            })
        })
    }

    func applicationDidBecomeActive(aNotification: NSNotification) {
        backgroundTimer?.invalidate()
        backgroundTimer = nil

        backgroundTimer2?.invalidate()
        backgroundTimer2 = nil

        NSApplication.sharedApplication().dockTile.badgeLabel = ""
        if (self.activatedFromBackground) {
            if (self.reactivationMenuItem.state == 1) {
                webView.evaluateJavaScript("reactivation()", completionHandler: nil)
            }
        } else {
            self.activatedFromBackground = true;
        }
