               console.log 'failed parsing imported json'
               console.log e
 
-        $ '#dialog-close'
+        H.$ '#dialog-close'
           .addEventListener 'click', (ev) =>
             ev.stopPropagation()
             @clear_dialog()
 
-        $ '#dialog'
+        H.$ '#dialog'
           .addEventListener 'click', => @clear_dialog()
 
-        $ '#dialog-json'
+        H.$ '#dialog-json'
           .addEventListener 'click', (ev) -> ev.stopPropagation()
 
     mode: 'auto',
     color: {},
 
     toggle_slides: ->
-        $ '#auto'
+        H.$ '#auto'
             .classList.toggle 'active', @mode is 'auto'
-        $ '#manual'
+        H.$ '#manual'
             .classList.toggle 'active', @mode is 'manual'
 
     clear_dialog: ->
-      $ '#dialog'
+      H.$ '#dialog'
         .style.visibility = "hidden"
 
-      for el in $$ '.import-dialog'
+      for el in H.$H.$ '.import-dialog'
         do -> el.style.visibility = "hidden"
 
-      $ '#dialog-json'
+      H.$ '#dialog-json'
         .value = ""
 
 

        @add_button.addEventListener 'click', (event) =>
            event.preventDefault()
            @add()
            @table.appendChild last(@views).render().row

        $ '#save' 
            .addEventListener 'click', (event) ->
                event.preventDefault()
                chrome.runtime.sendMessage {

        @port = chrome.runtime.connect name: 'options'
        @port.onMessage.addListener (msg) ->
            if msg.type is 'set auto_opac'
                H.$ '#auto_opac-toggle'
                    .checked = msg.value

        self = this
        H.$ '#color'
            .addEventListener 'input', (event) ->
                event.preventDefault()
                self.color = C.hex_to_rgb @value
