scroblr

I used to listen to my Last.fm station a lot, but lately I have been stream my local radio station (107.7 The End, Seattle). I like the variety and even some of the DJ banter while I work. I work from home and it makes it seem a little less like I am sitting at home in my office by myself.

The one downside was no scrobbling. I had another Chrome plugin but it did not work with Abacast (the platform 107.7 uses to stream their broadcast). I looked into making the plugin work with Abacast, but to be honest the docs were kinda poor and the API was a little “scattered”. I looked at more open-source plugins and found scroblr. It isn’t anything fancy, but the API made it a snap to create a new plugin for Abacast. I forked the code, whipped up a plugin, tested and submitted a pull request in under an hour. Now I am happily scrobbling from the 107.7 stream.

jQuery Download Plugin

jQuery Download Plugin

I was in need of an “export” button to export some data to a CSV file, but the data changes based on some other choices. I added my js to export the file and then – DUH! You cannot use ajax to return a file. Silly me… 🙂

I figured I could wrap a form around the button and set a hidden input and blah blah blah. I googled and found the above, which basically does all that for me and gives me a convenient 1 liner to work much like an ajax call would but allow for a “save as” dialog. It is pretty neat-o!

jQuery finds

I just ran across a couple of cool things to solve some problems. I needed a small pub/sub solution, and I found a tiny one:

jQuery Tiny Pub/Sub

It is a pretty slick little implementation and, more importantly, helped me solve my problem.

I needed to lazy load images, and there are a few solutions out there, but I was looking for something small (do you see a theme?) and I found this:

Unveil.js

This takes a very nice lazy load plugin and strips it down to the most basic of functionality resulting in a great lazy load plugin that comes in under 1k.

Select2 and Chosen

I was looking at my options for including an image in a select list – why is this not easier?

Anyway, I found some good Stackoverflow Q & A’s, and one mentions Select2. This is a pretty slicklooking jQuery extension, and it is based on another really cool plugin, Chosen.

The Select2 site uses Bootstrap, and the more I see examples in Bootstrap the more I <3 Bootstrap! I have discussed moving our company site over to Bootstrap to take advantage of the goodness that it offers (especially responsive UI) and the Select2 would be a great addition.

So much to do and so little time… 🙂

MultiSelect with checkboxes

More work on my nopCommerce plugin. This time, I wanted to offer more than the standard multi-select listbox. I thought it would be nice if the list had checkboxes. There are an infinite number of smarter people out there than myself, so I Googled knowing someone had some javascript goodness. I found the jQuery UI MultiSelect Widget. This is an awesome little plugin that is themable using jQuery UI. I know that nopCommerce doesn’t use jQuery UI in the admin (it is a Telerik MVC “shop”), but I still appreciate the ability since I really love the jQuery UI stuff.

jQuery Star Rating Plugin

I am thinking about adding a star rating to one of the sites at work, so I started poking around for what was available in a jQuery plugin. Surprisingly, there are quite a few plugins but none that I totally fell in love with. they either don’t degrade, or use form elements I don’t hink they should, or whatever. I thought it would be a good exercise to try and roll my own plugin.

I started of checking out some how-to’s for jQuery plugin writing, but I usually learn better by doing, so I started with the closest thing I like, Wil Stuckey and John Resig’s rating plugin. It is pretty good, but it just needed a little nudge to be better. I figured this was a good way to start. I would not have to write an entire plugin from scratch, and I’d learn from one of the guys that created jQuery, so how could I go wrong?

It took a few days, with a few hours spent here and there. All in all I feel pretty good about the plugin, though I am sure I could make it better, and I likely forgot something important. If you are interested, you can grade the code from my code section, and there is a demo available too. Let me know what you think in the comments.