'use babel'

import { CompositeDisposable } from 'atom'

export default {

  activate() {
    atom.commands.add('atom-workspace', {
        'zurb-doc:doc': () => this.search()
    })
  },

  search() {
    var shell = require('shell')
    var wordToSearchFor = atom.workspace.getActiveTextEditor().getSelectedText() || atom.workspace.getActiveTextEditor().getWordUnderCursor()
    var grammar = atom.workspace.getActiveTextEditor().getGrammar().name;

    shell.openExternal('http://foundation.zurb.com/sites/docs/' + wordToSearchFor + '.html')
  }

}

@@ -373,82 +373,8 @@
 or()
-%0A    var grammar = atom.workspace.getActiveTextEditor().getGrammar().name;
 %0A%0A  
@@ -468,11 +468,10 @@
 l')%0A  %7D%0A
-%0A
 %7D%0A

edit lib js