FB Friend Selector

It doesn’t happen often, but when you’d like to invite ALL of your friends to your Facebook event, you’re left with the daunting task of having to go through and click on each person, one by one.

Well not anymore!

Using what I learned from my previous project, a simple bookmarklet will allow you toggle all of your friends with one click.

To use it:

1. Drag the following link to your bookmarks bar.

2. Go to your Facebook event page and open the ‘Invite Friends’ dialog.

3. Make sure to scroll all the way down, so it loads all of your friends.

4. Click on the link you just bookmarked.

5. Depending on how popular you are, it may take a second. Then you’re done!

As per usual, here is a link to the pure JavaScript file.

Enjoy!

FCCheck

If you’re simply looking for FCCheck, a quick and easy way to make sure lyrics are FCC clean, click here! To install this on your computer, simply drag this link to your bookmark bar. Or copy the Link Location from the link and save that as the URL for a new Bookmark item.

What?

FCCheck is a tool that will allow you to very easily view all the FCC 7 dirty words on a page. This can be especially useful for DJ’s looking to clean up some (potentially) dirty songs.

Why?

For those of you who don’t know, I am an underground hip hop DJ on WKNC. Check out my co-host (Casual-T) and me (tomeslice) on Sunday nights, midnight-1:30 am. Tune in: http://wknc.org/listen.

It didn’t take us long to find out that one of the hardest parts of being hip hop DJ’s was finding clean music. For each song we wanted to play, we had to look up the lyrics, use the Find command and search for the ‘dirty 7’, an informal list that the FCC uses to make sure radio broadcasts are age-apropriate, and then skim the page just in case we missed something. This process became long and tedious after some time, as you might imagine. So I threw my thinking cap on, and in just one afternoon was able to come up with a solution: FCCheck.

I wanted to automate the process of searching for the dirty 7 in a lyrics page. I’ve used UserScripts before, but the nature of the UserScripts wasn’t what I was looking for. I wanted a button of some sort that I could click on while I was browsing any page, and for it to count how many occurrences of each word was on the page. And just for fun, highlight each occurrence as well. I was sadly coming to the realization that I may need to turn this project into a browser add-on. This isn’t a big deal, except for that I didn’t want to have to make 4 browser add-ons for each browser. Plus, I wasn’t familiar with how to go about doing this.

And then it hit me: bookmarklets.

If you haven’t heard of bookmarklets, you’re missing out. Bookmarklets let you store a JavaScript function, as a URL, in your bookmarks. This means that you can have the power of JavaScript, on any page you’re browsing, just a click away. To see how powerful these can be, check out some of these:
Kick Ass – Turns any page into an interactive, Asteroids-like game
Mark Up – Let’s you draw and write notes on any page you’d like, and then share it with the Mark Up Community
Urban Dictionary Lookup – Looks up the selected term on the page on Urban Dictionary
Wikipedia Lookup – Looks up the selected term on the page on Wikipedia

A bookmarklet was so perfect for this project, I don’t know how I didn’t realize it earlier. A few hours later, FCCheck was born. Try it, click on it! (To install FCCheck, drag the previous link to your bookmarks bar. You’re done!)

How?

The first thing I did was made sure the bookmarklet pointed to my servers to fetch the script. This has a few advantages. If I ever want to update the script, make it more efficient, or add some features, it will automatically show up for everyone who’s using the same bookmark! Plus, I can easily track and see how many people use the script. However, hosting the script on my server means that it can’t be edited by the user. And for that purpose, as well as if you’d just like to check out my code, here is a link straight to the JavaScript so you can do with it what you please!

Next, I needed a good way to count occurrences of words on the page, and then highlight them. As of now, RegEx is used to count the occurrences, and a third-party script searches through the page’s source and highlights each word on the page. Then an alert is shown displaying the number of occurrences of each word in the dirty 7 array, and a total at the bottom.

While I can say with great certainty that it should work correctly most of the time, please make sure you look over FCCheck’s results. I do not want to be held liable in case of any mishaps. Also, keep in mind that FCCheck will scan the WHOLE PAGE when looking for cuss words. On lyric sites where people post comments at the bottom, or if there are links to other songs at the sidebars, FCCheck will tally up those words as well. In other words, please use caution while using this bookmarklet and remember that it is not a one-all solution.

Thoughts? Improvements? Efficiency boosts?