mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 17:11:40 -05:00
Re-comment main.coffee.
This commit is contained in:
parent
5d3084a25c
commit
f57609ddc3
1 changed files with 11 additions and 6 deletions
|
@ -1,9 +1,14 @@
|
|||
# "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
|
||||
# Quick and dirty prototyping.
|
||||
#
|
||||
# Functions declared here can be called in the debug window in ff.
|
||||
|
||||
handleBrowserAction = () ->
|
||||
# .then takes a function that consumes at least one argument. this is an
|
||||
# example of a named function, but anonymous functions are fine, too.
|
||||
browser.tabs.query({active: true}).then(console.log)
|
||||
|
||||
# Example of a listener. Presumably we wouldn't use the browserAction button in
|
||||
# the real thing.
|
||||
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
|
||||
console.log("Loaded Tridactyl")
|
||||
|
|
Loading…
Add table
Reference in a new issue