Namespacing Globals
Hi,
Just checking out your extension to see if there were any conflicts with other extensions. Seems your overlay is well-done, but there are a few global variables not namespaced with "torbutton" or "tb" in your torbutton.js file (found with the excellent Netbeans JavaScript IDE features: Navigator).
- "tooltip" in torbutton_update_toolbutton() needs "var" decl.
- "i" in torbutton_browser_proxy_prefs_init() needs "var" decl.
- "win" in torbutton_is_same_origin() (Is this why there is a to-do there saying the code doesn't work? "win" has not been defined globally (though it should not be to avoid conflicts with other extensions). I guess you wanted a windows enumerator here?
If you really wanted to protect yourself, maybe do a replace of all of the "tb" with "torb", since I can envision there being others tempted to use that (e.g., "tab", etc.), but at the very least, the ones above are definite ones to fix...
(Edit: Added some line breaks. One day we'll have a bugtracker that can break lines itself.)
[Automatically added by flyspray2trac: Operating System: All]
Trac:
Username: brettz9