Blog Post RSS ?

Blogs » JavaScript & CSS » Dust-Me Selectors Version 2.0
 

Dust-Me Selectors Version 2.0

by James Edwards

After many months of toiling in our secret underground laboratories, Dust-Me Selectors Version 2.0 is finally here!

If you’re one of the many people who made suggestions or commented on the original version, you’ll be pleased to know that the new version incorporates everything you asked for and more.

It was quite a challenge to bring all this together, particularly since Mozilla’s documentation is so … er … erratic (in fact for some functionality I had to look in Firefox’s source code just to figure out how it’s done!) But there’s nothing like a challenge to exercise the mind, and I think you’ll agree that the final result is well worth the gritty struggle.

To summarise the new features:

  • New spidering capability — it can spider either a Sitemap XML file, or an HTML sitemap (ie. it will spider one link deep from any page).
  • Shows which selectors have been used, as well as unused.
  • Data storage has been taken out of the preferences system and into the filesystem — data is stored in JSON files in a user-selectable
    folder.
  • Better support for Conditional Comments — it can now recognise any number of stylesheets within a single comment.
  • Extended automation so it can re-parse a page automatically whenever the DOM changes programatically.
  • Comprehensive user preferences.
  • Support for Flock.
  • A spiffy new icon, courtesy of Alex Walker

For more information, documentation and to install the new version, check out Dust-Me Selectors on sitepoint.com

If you liked this blog, share the love:

  • Save to Del.icio.us

This post has 21 responses so far

  1. And now the big question…Does it support Firefox 3? :)

     
  2. No - I’m gonna wait til it’s out of beta; mozilla have an annoying habit of making massive changes at the last minute.

     
  3. The Firefox addons update feature doesn’t find the new version.
    You have to (remove 1.1 first?) add it manually.

    (tools>addons “find updates”)

     
  4. Fails to work under Linux (FC6) Firefox 2.0.0.1

     
  5. For me it’s not working, too. (Kubuntu Gutsy with FF 2.0.0.10)

    “Not working” means:
    - I can’t view the result
    - some popups stay open when clicking ok or cancel

    So for me it’s unusable :(

     
  6. Great tool, saves me hours of work ..

     
  7. For me it is working, too. (Kubuntu Gutsy with FF 2.0.0.10)

    It is a matter of file permissions

    After having set preferences, use the following folder:
    ! create a folder eg: dust-me in your home folder !

    it works like expected

     
  8. Hi,

    Great tool, but it didn’t quite do what I had in mind.

    I’m merging/copying/moving/cleaning a whole bunch of style sheets, and I need a way to find all the cases on a page where the code calls for a class=”fubar”, but fubar is not efined in the current style sheet.

    I realize that CSS is intended to not fail because a style is not defined, but it’s a pain to cross reference.

    Any suggestions? or hope for a mod to Duster?

    mm.

     
  9. I found this extension didn’t work at all as I navigated my site. It only seemed to be able to capture everything on a single page.

    I write Firefox extensions as well and decided to look through the code.

    To get the extension to aggregate unused items properly, I had to comment out this line in dustmeselectors.js:
    if(typeof used[current_key][current_index] != 'undefined') { //delete used[current_key][current_index]; }

    It seems that it was deleting the key from the used tab without readding it. So redundancy meant kill both of them.

    Anyway, with that change it worked great for my site. Thanks much.

     
  10. Trying it this way to see if the code paste works better. The comment is for the delete line around line 277:

      
    if(typeof used[current_key][current_index] != 'undefined')
    						{
    							//delete used[current_key][current_index];
    						}
    
     
  11. Thanks for the info on these various issues - I shall investigate.

     
  12. Simply Superb

     
  13. Hi James, I would LOVE to test your plugin, but http://www.sitepoint.com/dustmeselectors/ is offline :/?

     
  14. Hi James, I would LOVE to test your plugin, but http://www.sitepoint.com/dustmeselectors/ is offline :/?

    Weird, Tom. We’ll look into that first thing tomorrow (AU time).

     
  15. Thanks for the heads-up, that was a permissions problem that’s fixed now.

     
  16. I cannot install Dust-Me Selectors - I only get an error message from the add-on installer (-207) that it is not a valid installation file. I’m using Firefox 2.0.0.12 under MacOS 10.4.11

     
  17. I can’t wait for a version that works with Firefox 3! Will there be an announcement when this is updated? Thanks!

     
  18. …This plugin needs some work.

     
  19. Unfortunately, it’s not working with my Wordpress blog…

    Tried the spider function. I have a sitemap which is generated with the Google Sitemap Generator plugin by Arne Brachhold. Pointing to that file (www.saphod.net/sitemap.xml) did not work and took ages without anything happening.

    Then I just tried “www.saphod.net”… but as I was still logged into my WP account, dust-me tried to analyze even the WP admin folder.

    So I logged out and tried the root directory again… seemed to work, I mean it finished… well, I’ll have to take a good look at the results now if they are any good.

    I’m sorry, but I have to share Wolf_22’s opinion:
    It still needs some work… sorry.

    But a great idea, nonetheless!

     
  20. [Update]
    Root directory wouldn’t work either… only a few posts / pages have been spidered… what a pity.

    OK, as I can’t subscribe to comments here, can anyone upfate me via http://www.saphod.net/contact/ if anything important happens? As I said: I love the idea of this plugin.

     
  21. Fantastic tool! Works like a dream.
    I’d love it more if it could delete unused selectors for sites I’m designing and want to clean up the css - either through a preview of files on my computer (before uploading) or through ftp access (especially for php or asp sites)

     

Sponsored Links

Leave a response

You are not logged in, log in with your SitePoint Forum username and password.

-OR- Post Anonymously

* Make sure any code samples are escaped (i.e. ‘<b>’ becomes ‘&lt;b&gt;’).

If not logged in, your comments will be placed in a moderation queue. This means your comment may not appear until one of our moderators approves it.

SitePoint Marketplace

Buy and sell Websites, templates, domain names, hosting, graphics and more.

Logo Design, Web page Design and more!

99designs

  • Custom logo designs created ‘just for you’.
  • Pick the design you like best.
  • Only pay if you’re satisfied with the result.