From f57609ddc305f975a5d357c3dbf589a247306d45 Mon Sep 17 00:00:00 2001 From: Colin Caine Date: Mon, 13 Feb 2017 15:16:34 +0000 Subject: [PATCH] Re-comment main.coffee. --- addon/main.coffee | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/addon/main.coffee b/addon/main.coffee index 1f5e9447..692ce503 100644 --- a/addon/main.coffee +++ b/addon/main.coffee @@ -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")