I've been writing a Firefox extension, but have recently read a few articles explaining that it's bad practice to avoid variable name clashes by simple appending the application name to the front of the variable.
Unfortunately I have been doing this. What is the best practice instead? I assume it's to somehow namespace the variables. I've found various articles about wrapping everythign in a master object, but sadly no examples of this.
Can anyone point me to a good tutorial, or even a simple extension, that uses best-practices?
Thanks!
Just as too many unneeded apps will slow down your computer, too many plug-ins and extensions can do the same to your browser. They take up system resources and can even cause bugs and crashes.
Recommended extensions differ from other extensions that are regularly reviewed by Firefox staff in that they are curated extensions that meet the highest standards of security, functionality, and user experience.
Is Privacy Badger compatible with Firefox's built-in content blocking? It's fine to use Firefox's native content blocking and Privacy Badger together. While there is overlap between Firefox's tracker lists and Privacy Badger's protections, unlike list-based blockers, Privacy Badger automatically discovers trackers.
Extensions in private windows Firefox lets you decide which extensions are allowed to run in private windows. Additionally, an extension is not enabled for private browsing by default. You must grant it permission, either during installation or later through the extension's settings.
Peter Michaux explains Javascript namespacing very nicely.
You can have a look at this video from Google tech, which explains best practices for JavaScript coding which is a main part of Firefox extension development
http://www.youtube.com/watch?v=0LKDImgRfrg
alt text http://0.gvt0.com/ThumbnailServer2?app=vss&contentid=4d0ae57a8484fdf8&offsetms=275000&itag=w160&hl=en&sigh=GnGo87Drht4wi2JvP1L0PtvKT4M
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With