         worker.port.emit 'pass', p
     )
     return
+
+# Observer to detect pageload and change icons accordingly
+
+function_on_change_url = (t) ->
+  url = re_url.URL(t.url).host
+  if !url #for non-url pages
+    return
+
+  console.log url
+
+re_tabs.on "ready", function_on_change_url
+re_tabs.on "activate", function_on_change_url
 
 #
 #

  onHide: handleHide
})


panel.port.on 'generate', ((uname, url) ->
  get_pass uname, url, (p) ->
    panel.port.emit 'pass-returned', p

  else
    ds.add(url)

is_site_disabled = (site) ->
  return not (site in store.disabled_sites)

#panel.port.on 'is-site-disabled', (s) ->
#  panel.port.emit 'site-disabled', is_site_disabled(s)

#
#
# Init
