Add first attempt at addon in CoffeeScript

This commit is contained in:
Oliver Blanthorn 2017-02-12 15:47:34 +00:00
parent db001cd092
commit 04edd1ba26

9
addon/main.coffee Normal file
View file

@ -0,0 +1,9 @@
# "this" adds it to the global scope
this.handleBrowserAction = () ->
browser.tabs.query({active: true}).then(console.log)
# console.log logs the name of the function
browser.browserAction.onClicked.addListener(handleBrowserAction)
console.log("Loaded Tridactyl") # get a "cannot access dead object" error from somewhere,
# this doesn't turn up in the console / might flash