   activate: (state) ->
     atom.config.observe 'editor-background',
      (conf) => @applyBackground.apply @,[conf]
+    atom.config.observe 'editor-background.imageURL',(url)=>
+      @blurImage.apply @,[url]
+    atom.config.observe 'editor-background.youTubeURL',(url) =>
+      @startYouTube.apply @,[url]
     @initialize()
 
   appendCss: () ->

      @elements.boxStyle.innerText=".eb-box-wrapper{display:none;}"

  blurImage:->
    conf = atom.config.get('editor-background')
    @elements.image.setAttribute 'src',conf.imageURL
    applyBlur = false
    if conf.blurRadius > 0
      if @elements.image?
        if @elements.image.complete
          applyBlur = true
        else
          setTimeout (=> @blurImage.apply @),1000
    if applyBlur
      imageData = blur.stackBlurImage @elements.image, conf.blurRadius, false
      base64Data = imageData.replace(/^data:image\/png;base64,/, "")
      filename = atom.packages.resolvePackagePath('editor-background')+
      "/blur.png"
      filename = filename.replace /\\/gi,'/'
      fs.writeFileSync filename, base64Data,{mode:0o777,encoding:'base64'}
      imageData=filename+"?timestamp="+Date.now()
    else
      imageData = conf.imageURL
    @elements.blurredImage = imageData
    if conf.boxDepth > 0
      @updateBox()
    else
      inline @elements.bg,"background-image: url('#{imageData}') !important"

  applyBackground: ->
    atom.workspaceView.addClass 'editor-background'

      @colors.workspaceBgColor=style(@elements.editor).backgroundColor
      @colors.treeOriginalRGB=style(@elements.treeView).backgroundColor
      @packagesLoaded = true

      @blurImage()
      @applyBackground.apply @
    else
      setTimeout (=>@initialize.apply @),1000
