Re-comment main.coffee.

This commit is contained in:
Colin Caine 2017-02-13 15:16:34 +00:00
parent 5d3084a25c
commit f57609ddc3

View file

@ -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")