Detecting globals with a bookmarklet

In: web resources

16 Aug 2009

Kangax stumbled upon a blog post by Remy Sharp on detecting global variable leaks. He took that work and updated it a little to filter out Prototype, Script.aculo.us, Google and Mozilla globals.

If you want to add sets it is easy to do so… go fork away. The bookmarklet itself is here.

Of course:

It’s worth mentioning that JSLint already allows detecting undeclared assignments, but JSLint can hurt feelings so we won’t use it. Well, actually JSLint performs so many validations, that it’s not always possible to detect undeclared assignments in huge scripts of legacy applications (like the one I wanted to examine). Running a test such as in this bookmarklet can be “applied on” any script.

Comment Form

About this blog

This blog delivers stylish and dynamic news for designers and web-developers on all subjects of design, ranging from: CSS, Ajax, Javascript, web design, graphics, typography, advertising & much more. Our goal is to help you communicate effectively on the web with an engaging website or functional interface.

  • Cliffieduckie: I found this website It said this about parrots and it relates to any other birds The Towel [...]
  • slk55amg19: Hi Brie, Our company is a top 10 Internet Marketing company. We have been featured for two consec [...]
  • Arthur Read: depending on the size of the driveway, maybe 5-10 bucks. 5 for small 10 for mediums if it's rea [...]
  • rtfm: What kind of information would you be looking for that isn't on Wiki or the company's own [...]
  • LARRY J7: I can't vouch for this product cause I've never used it but basically what you need is a a [...]
Internet MegaMeeting, LLC Microsoft Store LinkShare  Referral  Program Iolo technologies, LLC Artisteer - Web Design Generator FTPress.com (Pearson Education) Mobile Security: Parental Controls and Monitoring Atom Entertainment (formerly AtomShockwave)
.
Web Analytics