mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 09:31:41 -05:00
Add first attempt at addon in CoffeeScript
This commit is contained in:
parent
db001cd092
commit
04edd1ba26
1 changed files with 9 additions and 0 deletions
9
addon/main.coffee
Normal file
9
addon/main.coffee
Normal 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
|
Loading…
Add table
Reference in a new issue