added short comments for all JS functions

This commit is contained in:
Will Bamberg
2016-01-14 15:06:44 -08:00
parent d65a87520c
commit b636b41f1b
9 changed files with 85 additions and 1 deletions
+7
View File
@@ -1,5 +1,12 @@
/*
Add notifyExtension() as a listener to click events.
*/
window.addEventListener("click", notifyExtension);
/*
If the click was on a link, send a message to the background page.
The message contains the link's URL.
*/
function notifyExtension(e) {
var target = e.target;
while ((target.tagName != "A" || !target.href) && target.parentNode) {