Mozilla, Mozilla Firefox, TubeStop, YouTube

Adopt an Add-on: TubeStop

TubeStop was discontinued on December 25, 2012, and Firefox’s newly-introduced controls for managing auto-playing videos have since made it obsolete.

I’m no longer going to be updating TubeStop, a Firefox extension I wrote that disables autoplay on YouTube videos. I don’t have the time or the inclination to keep up with YouTube’s HTML changes.

TubeStop has been around for about five years, and it has 17,000 users. It was the first browser extension that made it possible to disable YouTube’s autoplay feature (if you don’t count the all-purpose Flashblock), and it gained notoriety in 2007 for inadvertently stripping ads from YouTube videos.

If you’d like to adopt this abandoned add-on, let me know, and I’ll transfer ownership of the extension to you on Mozilla Add-ons. If nobody wants to take over development, I’ll shut it down and the void will be filled by one of the other anti-autoplay extensions on AMO.

Standard
Blogging, Writing

Somebody’s Gonna (Write a Book About The) Lotto

tl;dr: I’m writing a novel about the lottery at lotterynovel.wordpress.com.

I’ve always wanted to write a book; it’s on a list I made about ten years ago of things that I’d like to accomplish in life. I’ve had a couple of topic ideas floating around in my head, but the lottery is one that I think I can really run with. (Sentences ending with prepositions are just one of the literary treats you’ll be party to if you read my book.)

I don’t get many opportunities to write fiction, although some of my co-workers might argue that my comments explaining how my code is supposed to work would count. This is also a chance to see the platform I work on every day in a different light as I use it for sequential story-telling rather than blogging.

By publishing the sections as soon as I write them, I’ll be able to benefit from immediate reader feedback (assuming that there will be any readers). I suppose this is a sort of crowdsourcing turn on the editor feedback model of traditional publishing, and I’m not sure whether it will be a blessing or a curse.

When I finish, I’ll package the whole thing up as an e-book and learn a little something about that process too. Until then, I invite you to read along as I write my way towards a conflict and its eventual resolution. The first portion was posted a couple of days ago, and part two will be up this week.

Standard
Blogging, Clean and Sober, Programming, Themes, WordPress

New WordPress Theme: Clean and Sober

Today, I’m releasing my site’s theme (the design you’re looking at right now) as a free open source theme for WordPress. I’m calling it Clean and Sober, and it’s compatible with WordPress 3.4 and up. Here’s the default homepage:

The default Clean and Sober homepage.

It’s designed mainly with single-author blogs in mind, since I initially wrote it for (this) single author blog, and there are not a lot of graphics (zero, to be exact), since I am, how-you-say, very bad at doing art.

This is the first WordPress theme I’ve released in five years (the last being Greencode in January of 2007), and the first one that I’ve tried to make compatible with all of the Theme Review Guidelines, and let me tell you, it is exhausting. Major props to the themers who can do this more than once every five years.

Some notable notes:

  • Post excerpts are displayed on index pages beneath the post title. If no excerpt is defined, nothing is displayed there.
  • You can define one menu, which is displayed beneath the header. If a menu item has children, they will automatically be shown in a dropdown menu.
  • On pages with an author (posts, pages, etc.), the author’s bio will be displayed beneath the content if the author has written a bio and saved it in their profile’s Bio field.
  • On pages without an author (search results, the homepage, etc.), you can choose a user to be displayed as the default author. This is handy for single-author blogs that are identified solely with one user. This setting can be changed from the theme customizer.
  • The contact links on the right side of the bio are defined at the bottom of your profile page.

It works well for my needs, but I’m interested to see all the new and exciting ways that other people can break it by trying it on their blogs. Give it a shot and let me know how you like it in the comments, or just take a look at this gallery of screenshots:

Standard
Formategory, Plugins, WordPress

Formategory: A WordPress Plugin Four Years in the Making

You may recall (but you probably don’t) that four years ago, I was looking for a WordPress plugin that would let me add a postscript to all of the posts in a given category. I wrote a simple proof-of-concept at that time, called it Formategory (“Format” by “category”), and left it to simmer in my subconscious.

Well, you can stop holding your breath, because even though I forgot about it for three years and eleven months, I’ve finished the first version and uploaded it for you to use! Here’s a screenshot of the template editing screen:

The editing screen for a category template.

A full description and usage instructions are on the Formategory homepage, but if you’re one of those people who would rather trial-and-error your way through it than read the manual first, here’s how you can get started:

  1. Search for “Formategory” in the “Add new plugin” screen on your WordPress dashboard and install it from there.

or

  1. Download the .zip file from Extend.
  2. Choose “Add New” from the “Plugins” menu in your WordPress dashboard
  3. Upload the .zip file.

Activate it, click the new “Category Templates” link in your dashboard’s menu, and create your first template.

Translators: formategory.po is included in the /languages/ directory if you’d like to translate Formategory. Thanks to Andrew Kurtis from WebHostingHub for providing the es-ES translation. To ensure that Formategory is displayed in your language, follow the instructions at WordPress in Your Language.

By the way, this post about Formategory is using Formategory to auto-add the download link for Formategory to the end of this post. Formetagory, am I right?

Standard
Life, Video

How I manage my digital home videos

My family shoots a lot of video. We’re on our second Flip camera, we used a mini-DV camcorder until it would no longer record cleanly, my wife and I both have iPhones, and we have two young sons who we find very photogenic.  Add that all up, and you get what can seem like an unmanageable amount of digital video: 560GB divided between 1,500 video clips since 2004, 80% of that since our first was born in 2009. At last count, those clips totaled 80+ hours, and that number is increasing every day.

A couple of years ago, I digitized all of my wife’s family’s home videos from the 80s and 90s, and it was heartbreaking to see how much of the videotape had degraded and was no longer watchable.  I didn’t want anything like that to happen to our family memories, whether it be due to hard drive crash, accidental deletion, or just disorganization, so over the last few months, I’ve formalized the system that I’ll use to ensure that all of our videos stay organized and backed up.


On the first of every month, I ensure that all videos from our Flip camera (which we use rarely, and usually only for long recordings) and our iPhones have been transferred to a computer. On that computer, there’s a daily cron job that looks for new video files in the Flip and iPhoto libraries and copies them to the “Home Videos” folder on our Drobo, which is network-accessible via our Time Capsule.

Using exiftool, all of these new files are automatically renamed using the format “2012-01-02 03 04 05.MOV”, where the filename is the date and time the video was taken:

exiftool "-FileName<CreateDate" -d "%Y-%m-%d %H %M %S.%%e" [files_to_rename]

I then add captions to the videos by adding a description of the video to the filename (after the timestamp). If multiple clips are from the same event, I can leave them without a description, and a cron job will automatically add the description from the previous clip, appending ” – 2.MOV”, ” – 3.MOV”, etc. (It only does this for clips taken within a 15 minute window of one another.) It takes me about 10 minutes to caption a month’s worth of video.

I chose to organize the video files directly, without using any video library management software, since I want to have as much control over the portability of the clips as possible.  I’ll want to be able to stream them to myriad devices over my home network or even the Internet, and I don’t want to have to deal with whatever folder and file structure was chosen by the management software.

If all I wanted to do was keep all of my clips organized by date in a folder, I’d be done right now, but I want to burn DVDs of this footage for easy physical portability, universal playability, and as a last-ditch backup solution.1

A cron job runs every night, checking if I have accumulated 2 hours of named footage in the folder on the Drobo that has not yet been burned to DVD. If I have two hours, but it’s not all named, I get an e-mail reminding me to name it. If I have two hours and it is all named, it will automatically create an iMovie project, populating it with the clips (using ffmpeg to convert all the non-.MOV videos into a format that iMovie won’t choke on). It also auto-creates chapters in the project by stripping the timestamps from the clips and adding a new chapter for each new event. For example, this set of clips:

  • 2001-01-01 00 00 00 – New Years Day.MOV
  • 2001-01-01 00 04 03 – New Years Day – 2.MOV
  • 2001-01-01 00 17 12 – New Years Day – 3.MOV
  • 2001-01-21 17 00 00 – Christina’s Birthday.MOV
  • 2001-01-24 14 00 00 – Hiking.MOV
  • 2001-01-24 14 11 00 – Hiking – 2.MOV
  • 2001-01-29 15 00 00 – Snowboarding.MOV

would result in this chapter list:

  1. New Years Day
  2. Christina’s Birthday
  3. Hiking
  4. Snowboarding

Once the project has been generated, the rest of the process is manual, since I want to hand-check the chapters and make sure that a multi-day event (like a family vacation) hasn’t been split across DVDs. I also like to customize the DVD with relevant background images and an appropriate theme. (I’ve even been known to pick out some complementary background music for the menus if I’m feeling particularly creative.)

Once the DVD project is ready, I export it as a disc image to a different folder on the Drobo and eventually burn it to a physical disc.


It’s a solid setup for my next project, which is to find a way to easily watch all of these videos on our Tivo, our iPhones, or at least via a Mac Mini connected to our TV, because having all of this video of family memories doesn’t matter if it’s too much of a hassle to actually watch it.

How does this compare to your own process for organizing and managing your personal media collection? Any tips or tricks that you’d like to share?

1. It’s not my only backup: in addition to the inherent drive failure protection provided by the Drobo, I have everything backed up to two external drives as well, one of which is kept at home, the other off-site. Every six months, I update the contents of the on-site drive, swap it with the off-site drive, and then update the contents of that one too.

Standard
Browser Add-ons, Feed Sidebar, For Sale, Mozilla, Mozilla Add-ons, Mozilla Firefox, RSS Ticker

Firefox Add-ons for Sale

The time has come for two add-ons, RSS Ticker and Feed Sidebar, to find new owners.

Since I started developing add-ons for Firefox, I’ve written at least forty different extensions: some for personal use, some as a freelancer, and some as the primary function of my full-time employment.

In order to free up more time to pursue new ideas and projects, I occasionally need to either retire or transfer ownership of add-ons that I wrote of my own volition. Some of these, like TwitterBar and FireFound, were retired by executive decision. Today marks the first time that I am attempting to actively sell the rights to some of my add-ons.

Allow me to brag about these add-ons

RSS Ticker and Feed Sidebar are my two most popular add-ons, and they’re fully functional in the most recent version of Firefox.

RSS Ticker Screenshot

Both of them have been featured as “featured” or “recommended” add-ons Mozilla Add-ons multiple times, and both maintain healthy usage by a dedicated base of users not interested in Web-based feed readers.

RSS Ticker averages 39,000 daily users and has been download 1.3 million times. Feed Sidebar averages 21,000 daily users and has been download over 900,000 times. The two add-ons are unlikely to have overlapping users.

RSS Ticker is the first Google result for firefox ticker. It is also the first result for rss ticker and feed ticker.

Feed Sidebar screenshot

Feed Sidebar is the fourth result for firefox feeds and firefox feed reader and number two for firefox feed. It’s number one for feed sidebar.

Both of these add-ons would be excellent footholds for a Web-based feed reader to attract users who prefer to consume news directly from their browsers; they would be equally beneficial for content-oriented sites to push recommended feeds to users via the already-integrated “Featured Feeds” feature in both add-ons. (Both extensions regularly check a list of “Featured Feeds” and suggest these feeds as subscriptions to their users.)

What do you get if you buy?

If you buy either of these add-ons, I’ll:

  1. Transfer ownership of the add-on(s) to you on Mozilla Add-ons.
  2. Redirect the add-on pages on my blog to the pages of your choosing.
  3. Forward any feedback e-mail I receive regarding the add-ons indefinitely.
  4. Add you to my Christmas card list.
  5. Be a good guy in general and offer free consulting and advice related to the add-on(s) for as long as I can.

If you’re interested in purchasing either or both of these add-ons and taking over their development, e-mail me at chris@efinke.com.

Standard
AutoAuth, Browser Add-ons, Feed Sidebar, Interpr.it, Links Like This, Mozilla, Mozilla Firefox, OPML, Programming, RSS Ticker

Interpr.it now speaks Mozillian

My browser extension translation platform, Interpr.it, is now able to parse locale files from extensions for Firefox, Thunderbird, SeaMonkey, or any other Mozilla-powered program, and it can likewise generate Mozilla-compatible locale files. The interface for translation is the same as the one for translating Chrome extensions, but when the locales are downloaded via the API, the files are returned in the format in which they were originally uploaded (either DTD files or Java-style .properties files).

This is most obviously introducing a competitor to Babelzilla, the only major site offering a translation platform for Mozilla extensions. Babelzilla is a functionally sufficient solution for translation (I’ve used it without much issue for almost six years), but I’m moving away from it for two reasons:

  1. Translation/localization is a problem that I’d like to understand better, and I find the best way to understand a problem is to try and solve it yourself.
  2. I think that the experience of localizing an extension (or developing a localizable extension) can be better, and I have the hubris to think that I can be the one to make it better.

In the spirit of putting my money1 where my mouth2 is, I’ve moved five of my Firefox extensions (AutoAuth, Feed Sidebar, OPML Support, RSS Ticker, and Links Like This) from Babelzilla to Interpr.it.

If you are interested in trying Interpr.it, upload your extension (either using the Web form or API), and let me know how it works for you.

  1. For extremely small values of “money.”
  2. For extremely large values of “mouth.”
Standard
anyMail, Mozilla, Programming, Thunderbird, Toby

anyMail

Toby is no longer supported. I recommend using RoundCube Webmail instead.

Unlike most of my posts, this one isn’t about some new software I’ve written; it’s about some old software I’ve written.

In 2002, like any other college student out on his own for the first time, I decided to write my own e-mail client.

What – you haven’t written your own e-mail client? You will. As a complement to both Letts’ Law (“All programs evolve until they can send email”) and Zawinski’s Law (“Every program attempts to expand until it can read mail.”), I propose Finke’s Law: “All programmers will write their own mail client (and later regret it).”

I named my webmail client Toby and used it as my primary client for three years; once it was stable enough for other people to use, I started publishing updates on SourceForge (back before GitHub became the new SourceForge). Toby was my first legitimate open-source project.


Toby Web Mail, in its heyday, Outlook Express was a big influence. Also, the Pokemon cards were my brother’s.

In 2004, I needed a few more credits to finish my degree in Computer Science, and I opted to do an independent study under Joseph Konstan. (Professor Konstan was one of the only profs at the University of Minnesota at that time who had some involvement in Web software; the other one that I knew of was John Riedl, who was already the head of the fledgling Software Project class that I was a part of, which is a topic for another post.) For my project, I decided to refine my mail client, using IBM’s Remail prototype as a roadmap.

Over that semester, I rewrote Toby and branded it as anyMail. I don’t remember why I called it anyMail, but it was probably because it could connect to any IMAP or POP3 mail account. Clever.

Some of the features I planned on integrating into anyMail were inspired (read: stolen) from the very-new (at that time) Gmail; specifically, labels (instead of folders), the concept of “archiving”, and an entirely AJAX-based system for loading messages (although at that time, the term “AJAX” hadn’t been coined yet). However, one feature that I beat Google to was my own version of Priority Inbox. From my project proposal:

I intend to implement: […] Automatic sorting of incoming mail into different categories, such as read, unread, un-replied to, messages from people the user has replied to in the past, messages likely to be spam, messages from people in the user’s address book, etc. I feel that one of the largest areas for improvement in current Web mail clients is that of automatic information sorting and presentation.

(Of course, I wasn’t the first to ever think of this concept. Microsoft has prior art dating to the late ’90s.)

A concept I implemented from IBM’s Remail was thread arcs. Thread arcs are a way to visually represent a conversation using circles and arcs:

The hollow circles are messages sent by the user; the solid circles are replies. Clicking on a circle loads the corresponding message. Neat, but not terribly useful.

As far as I know, I was the only person to have implemented thread arcs outside of the Remail prototype at that time. They’ve gotten around by now; there is even a Thunderbird add-on that generates them.

So, fast-forward to a couple of days ago, where I had blissfully forgotten about the hundreds of hours I spent writing code to parse multipart e-mail. I was searching through my e-mail for something unrelated, and I happened across a conversation between myself and Rob Malda; I was applying for a job at Slashdot, and I had sent him a link to anyMail as a part of my application. The URL was dead, so I did the reasonable thing: hunted down a copy of the source code, upload it to that server, and get it to work.


Here goes nothing.

And it did work! After ten minutes of creating the necessary database tables and an email address to use for testing (I didn’t want to inadvertently wipe the contents of an important account – I trust my code, but I don’t trust trust it), I logged in and had a working instance of anyMail before me:

I played around, sent and received a few e-mails to confirm functionality, and was mostly pleased with how well anyMail held up.


The only flaw I found was that attachments didn’t get sent. That might be a misconfiguration my Web host though.

This was amazing to me. The last time I used anyMail, it was in Firefox 1.0, and it still works in Firefox 11 and Chrome Umpteen, without the benefit of a JavaScript library like jQuery doing the heavy lifting of cross-browser compatibility. It was also written in an environment with PHP < 4.3, and ran mostly without issue under PHP 5.2.

The other thing that surprised me was how consistent my coding style has been over the last eight years. Even though I was shocked and appalled by the gaping security holes (XSS, CSRF, and SQL injection issues were all present) and disgusted by the number of synchronous XHR calls, I was pleased to recognize the code as mine. I don’t specifically remember writing it, but I can tell by the formatting, variable names, and structure that it was formed by my hand.

I spent a few minutes cleaning up the code — some basic protection against XSS and SQL injection — and uploaded it to GitHub. I don’t expect anyone to use it (and I hope nobody does, at least not without modification), but I’m keeping it around so I can look back on it and learn from my mistakes. But hey, if you need a class to generate thread arcs in PHP or an email client that works in Firefox 1.0, you know where to look.

Standard
Browser Add-ons, Flock, Mozilla, Mozilla Add-ons, Mozilla Firefox, Mozilla Firefox for Mobile, Netscape Navigator, Software, URL Fixer

URL Fixer Has Been Acquired

Update: URL Fixer was acquired and is now hosted at http://urlfixer.org/

URL Fixer, one of the first add-ons I wrote for Firefox, has been acquired! It is now being managed by the team at URLFixer.org.

URL Fixer was inspired in 2006 by this Firefox bug report. Since then, it has been a featured add-on on the Mozilla Add-ons Gallery, it was one of the first add-ons to be compatible with Mobile Firefox, and it placed in the Extend Firefox 2 contest. It used to be compatible with both SeaMonkey and Flock (remember Flock?); its functionality was included in Netscape Navigator 9, and it was at one point under consideration to be included in Firefox 3.

URL Fixer has also been the subject of several experiments: it was the source of the statistics I used in my examination of what people type in the address bar, and it was the add-on I used to test the feasibility of selling a freemium browser add-on.

The new team in charge of URL Fixer recently released version 4, which you can install without needing to restart Firefox; I’m looking forward to seeing what other improvements they make and in what direction they take the add-on. Please note: support questions should no longer go to me; please send them to info@urlfixer.org.

Standard
AOL, Automattic, Blogging

Tturn, Tturn, Tturn

As Pete Seeger and King Solomon wrote, “To everything there is a season: A time to be born, a time to die; a time to plant, a time to start a new job at a new company.”

In that spirit, I’ve left AOL in order to join the team at Automattic. Not everyone has heard of Automattic, but almost everyone has heard of their flagship service, WordPress.com.

At Automattic, I’m a part of the Theme Team: a group of very attractive people with highly specialized skills in the realm of “Making your blog look good.” That’s a daunting task when you’re trying to cater to millions and millions of bloggers (and millions and millions and millions more readers), but I’m enjoying the challenge.

Standard
Browser, Google Chrome, Ideas, Internet Explorer, Life, Mozilla, Programming, Safari

An API for Browser Screenshots

What do the following screenshots all have in common?

From Amazon’s Cloud Reader Installation:

From the University of Virigina’s guide to setting proxy settings in Firefox:

From HootSuite’s TwitterBar acquisition announcement:

From Tecca’s Guide to Internet Explorer:

That’s right: they all include portions of browser chrome. (Chrome 13, Firefox 3, Firefox 4 for Windows, and Internet Explorer 9, I believe.)

What else do these screenshots have in common? They will all one day be out of date (if they aren’t already). As soon as Google modifies their extension installation dialog, or Mozilla changes their proxy settings tab, or the Firefox address bar gets a new background color, these screenshots will no longer accurately represent the interaction through which they’re meant to guide the user.

A Modest Proposal

I propose that this problem of stale browser screenshots could be alleviated by the creation of a Web service that exists solely to serve semi-dynamic screenshots of browser chrome. Allow me to explain with examples.

The Amazon screenshot above could be replaced with a call like this:

<img src="http://browsers.foo/addons/installation?highlight=confirm&w=460&h=60" />

Or the TwitterBar image could use this URL instead:

<img src="http://browsers.foo/toolbar/?include=url-bar,icon&icon=http://foo.com/hoot.png&highlight=icon" />

(Note the idea of being able to merge existing images into the screenshots.)

The IE add-ons dialog screenshot could just as easily call this URL:

<img src="http://browsers.foo/addons/tracking-protection?browser=ie&version=9&highlight=easy-list" />

The API would automatically use the user’s user-agent to determine what browser, version, and platform to show in the screenshot (although these could also be specified manually, as seen in the IE example). If images from the exact current version aren’t available, the most recent version could be used instead.

I think that with a couple dozen high-resolution, high-quality screenshots of the various windows and dialogs in each major browser version on each major platform combined with metadata defining the position of key elements in those screenshots (e.g., the home button, the address bar, the History menu), 90%+ of the browser-specific screenshots on the Web could be replaced by calls to this service.

What do you think?

Is this a solution in search of a problem, or is it a legitimately useful idea? I think it would be worth its development costs just for organizations like Mozilla or Google to use in order to populate their help documents with screenshots that would always be up to date. Tell me what you think in the comments below.

Standard
Browser Add-ons, Extend Firefox, FireFound, Mozilla, Mozilla Firefox

FireFound Shutting Down

Update: FireFound was shut down on April 1, 2012.

FireFound is a Firefox add-on and companion Web service that I wrote for the Extend Firefox 3.5 competition in 2009. It allows users to track their device’s location via Firefox’s then-new geolocation API; additional features include the ability to view a device’s location history on the website and the ability to turn on a “killswitch” that would clear your browsing data (history, saved passwords, etc.) if someone opened your browser and could not provide your chosen password. It was the first add-on of its kind, and it has been well-received.

That being said, FireFound will be shutting down on April 1, 2012. I don’t have the time to keep it compatible with the newest Firefox and Firefox Mobile releases, nor can I keep up with the feature requests and bug reports.

FireFound users who would like to save a copy of their location data can, as always, export their data by logging in and clicking the “Download” button on the “My Data” page. Any users who have pre-paid for a Premium account past April 1 will be given a prorated refund.

For those looking for a suitable replacement, I recommend Prey. It’s an open-source implementation of a similar idea, but it runs at the operating system level rather than inside the browser, so it’s always on.

(If you’re interested in taking over FireFound, e-mail me at chris@efinke.com. If you’d just like to run your own instance of FireFound, all of the code is open-source.)

Standard
Mozilla, Mozilla Firefox, Mozilla Firefox for Mobile, Programming, Technology, URL Fixer

What do people type in the address bar?

Update: URL Fixer was acquired and is now hosted at http://urlfixer.org/

Earlier this year, I added a feature to URL Fixer (a browser add-on that fixes errors in URLs that you type in the address bar) that collects anonymous usage stats from users who opt in in order to help improve the ways that URL Fixer corrects typos; the collected data includes domains that are typed in the URL bar as well as the locale (language/country) of the user who typed them.

I now have six months of data, and I’ve run some statistical analysis on it in order to share some interesting stats with you. (If I were more creative, I would make an infographic out of this information.) Note that this data does not include bookmarked links or links that users click on in websites. It is strictly domains that have been typed directly into the address bar.

Care to guess the most commonly typed domain? That’s right: facebook.com. It was typed almost three times as often as the second most popular domain, google.com.

The top 10 domains account for 20% of all typed domains.

facebook.com 9% twitter.com 1.1% amazon.com 0.5%
google.com 3.3% mail.google.com 0.6% reddit.com 0.5%
youtube.com 3.3% yahoo.com 0.6%
gmail.com 1.1% hotmail.com 0.6%

The most popular TLD for typed domains is .com, followed by .org, .net, and .de.

.com 63%
.org 4%
.net 4%
.de 4%
.ru 2%
.hu 1%
.fr 1%
.co.uk 1%
.br 1%

 

The top 17 TLD typos are all variations of .com. In order of frequency, they are .com\, .ocm, .con, .cmo, .copm, .xom, “.com,”, .vom, .comn, .com’, “.co,”, .comj, .coim, .cpm, .colm, .conm, and .coom.

The website that appears to benefit the most from users mistyping a legitimate URL is faceboook.com (count the o’s). It’s a scammy website set up to make you think that you have been chosen as a “Facebook Winner.” However, it is only typed once for every 7,930 times that someone correctly types facebook.com. (googe.com and goole.com are runners-up in this category, albeit with much less scammy sites in place than faceboook.com.)


49.5% of domains are typed with a leading “www.”.

The most popular non-.com/.net/.org domains: google.de, vkontakte.ru (a Russian social network), and google.fr.

The only locales where neither Google nor Facebook control the most popular domain are ru-RU (Russia – vkontakte.ru), fi-FI (Finland – aapeli.com, a gaming website), ko-KR (Korea – fomos.kr, an e-sports website), and zh-CN (China – baidu.com).

How does domain length correlate with typing frequency?

Domain Length vs Frequency Graph

(Facebook is to thank for the spike at 12 characters.)

How about alphabetical order? Has the old trick of choosing a site name early in the alphabet in order to show up above the fold on DMOZ had any lasting effect?

Facebook and Google certainly make their letters stand out, but there doesn’t appear to be a correlation between the first letter of the domain and its popularity.

None of the domains with more than a 0.0005% share are unregistered, indicating that this kind of usage data would not be very useful to a scammer or phisher looking for new domain names.

Standard
Funny, Google, Life

Offline Mode

Last year, I went on a Caribbean cruise with my wife and her family. I had a great time, but the downside to seven days aboard a floating resort in sparkling blue water is that the Internet access is prohibitively expensive: during that week, I was completely offline for the first time since my family first signed up with AOL in 1997, and this made me realize that I rely on search engines to answer the questions that life raises far more than I suspected. I’m sure that, to my wife, “Offline Chris” seems much less knowledgable than “Online Chris.”

Presented below without comment is a list of searches I would have performed if I could have; I don’t think it will be turned into one of those Google commercials any time soon, but it’s a pretty concise summary of our trip. See if you can infer anything about our trip; post your guesses in the comments.

  • define:Kirschwasser
  • How many people on Carnival Valor
  • define:vichyssoise
  • How many people have tattoos?
  • Capital of Belize
  • Denver channel 4 anchor
  • How to get cork out of bottle
  • Anteater bite
  • Tetracycline
  • Treat infection
  • Capuchin monkey
  • 10 knots in mi/hr
  • BWI cayman
  • Honduras ca
  • iTunes hey baby
  • Satellite Internet speeds
  • Office webisodes
  • Jack Welch
  • iTunes Brand New Day
  • Convert KW to HP
Standard
Browser Add-ons, Google Chrome, Mozilla, Mozilla Firefox, Programming

Using Google Chrome locale files in Firefox extensions, updated

After I posted my latest revision to some code for using Google Chrome locale files in Firefox extensions, Wladimir Palant pointed out some shortcomings with the code; I’ve made some changes to address these issues, and the new code is shown below.

View the code at GitHub.

Usage

The new usage rules are as follows:

  • Replace MY_EXTENSION_NAMESPACE with the namespace of your extension’s files. e.g., if your files are at chrome://abcdefg/content/, then replace MY_EXTENSION_NAMESPACE with abcdefg.
  • Rename MY_EXTENSION_STRINGS to something that won’t interfere with another extension.
  • The _locales directory from your Chrome extension should be in the chrome/content/ directory of your Firefox extension (or update my code to point to wherever you put it).

Advantages

This code has four advantages over the previous versions:

  1. It’s a single code block that works with all recent versions of Firefox.
  2. You don’t need to include an additional library for file I/O.
  3. It fixes a bug in retrieving the proper locale code in Firefox on Linux.
  4. You don’t have to specify <em:unpack>true</em:unpack> in your install.rdf in Firefox 4.

Thanks Wladimir for your input; this version is undoubtedly better than both previous versions. I can’t ensure that it’s the best possible solution, but it’s the best one that I’ve found so far.

Standard
Browser Add-ons, Google Chrome, Mozilla, Mozilla Firefox, Programming

How to use Google Chrome extension locales in Firefox 4 extensions

Update: Don’t use this code. Use this new version.

A few months ago, I posted a snippet of code that provides an API for using locale files from Google Chrome extensions in extensions for Firefox 3.6 and older. I’ve now added support for Firefox 4, and the updated code is shown below:

View the code at GitHub.

The same usage rules still apply:

  • Replace “MY_EXTENSION_ID” with the ID of your extension.
  • Rename “MY_EXTENSION_STRINGS” to something that won’t interfere with another extension.
  • The _locales directory from your Chrome extension should be in the chrome/content/ directory of your Firefox extension (or update my code to point to wherever you put it).
  • Include the excellent io.js library in your extension.
  • NEW: For Firefox 4, you’ll need to specify <em:unpack>true</em:unpack> in your install.rdf.

I’ve been using this solution in ScribeFire in Firefox 3.5, 3.6, and 4.0 (and 5 and 6) for a while now with no complaints. Let me know if you implement this in your extension, and I’d love any feedback you have on the code or its performance.

Standard
Browser Add-ons, Mozilla, Mozilla Add-ons, Mozilla Firefox, Slashdot, Slashdotter

Discontinuing Slashdotter

Slashdotter is an extension I wrote in 2006 in order to customize the Slashdot experience. It was covered on Slashdot and was received favorably by the Slashdot audience, but I don’t have the time anymore to update it every time Slashdot changes their UI or HTML.

If you’d like to take over development, let me know, and I’ll transfer the Slashdotter add-on to you on AMO; if nobody volunteers, I’ll be removing the add-on from AMO in a couple of weeks. (Like all of my browser extensions, Slashdotter’s source code is open source, so you could still develop your own version if you want.)

Standard
Browser Add-ons, HootBar, HootSuite, Mozilla, Mozilla Firefox, Twitter, TwitterBar

TwitterBar is now HootBar

Update: TwitterBar was sold to HootSuite and renamed HootBar in March of 2011. TwitterBar for Chrome was discontinued in October of 2012.

My Firefox add-on TwitterBar, the world’s most popular Twitter client for Firefox’s URL bar, has been acquired by HootSuite and has been renamed “HootBar.”

HootBar users now have access to great HootSuite features like the Hootlet: instead of typing “–post” at the end of your tweet, if you type “–hoot”, you can schedule your tweet for later, send your message to networks besides Twitter (like Facebook or LinkedIn), and track stats for link clicks.

The rebranded version of TwitterBar is still awaiting approval by Mozilla, but you can install it manually here. More information on the TwitterBar-to-HootBar change is available at HootSuite’s “TwitterBar to HootBar” transition page.

Standard
Browser Add-ons, Comment Snob, Google Chrome, JavaScript, Mozilla, Mozilla Firefox, Programming, Typo.js, YouTube Comment Snob

Announcing Typo.js: Client-side JavaScript Spellchecking

When I first ported YouTube Comment Snob to Chrome, Chrome’s lack of a spellchecking API for extensions meant that I would be unable to implement Comment Snob’s most popular and distinguishing feature: the ability to filter out comments based on spelling mistakes. That, my friend, is about to change.

I’ve finished work on the first version of a client-side spellchecker written entirely in JavaScript, and I’m calling it Typo.js. Its express purpose is to allow Chrome extensions to perform spellchecking, although there’s no reason it wouldn’t work in other JavaScript environments. (Don’t use it for Firefox extensions though; use Firefox’s native spellchecking API.)

How does it work?

Typo.js uses Hunspell-style dictionaries – the same ones used in the spellcheckers of OpenOffice.org and Firefox. (Typo.js ships with the latest American English dictionary, but you could add any number of other dictionary files to it yourself.) You initialize a Typo.js instance in one of two ways:

Method #1

var dictionary = new Typo("en_US");

This tells Typo.js to load the dictionary represented by two files in the dictionaries/en_US/ directory: en_US.aff and en_US.dic. The .aff file is an affix file: a list of rules for creating multiple forms of a word by adding prefixes and suffixes. The .dic file is the dictionary file: a list of root words and the affix rules that apply to them. Typo parses these files and generates a complete dictionary by applying the applicable affix rules to the list of root words.

Method #2

var dictionary = new Typo("en_US", affData, dicData);

With this initialization method, you supply the data from the affix and dictionary files. This method is preferable if you wish to change the location of the affix and dictionary files or if you are using Typo.js in an environment other than a Chrome extension, such as in a webpage or in a server-side JavaScript environment.

Once you’ve initialized a Typo instance, you can use it to check whether a word is misspelled:

var is_correct_spelling = dictionary.check("mispelled");

Customization

Depending on your needs, you can configure Typo.js to perform word lookups in one of two ways:

  1. hash: Stores the dictionary words as the keys of a hash and does a key existence check to determine whether a word is spelled correctly. Lookups are very fast, but this method uses more memory.
  2. binary search: Concatenates dictionary words of identical length into sets of long strings and uses binary search in these strings to check whether a word exists in the dictionary. It uses less memory than the hash implementation, but lookups are slower. This method was abandoned as it became impractical to implement for some features.

See this blog post by John Resig for a more detailed exploration of possible dictionary representations in JavaScript.

Practice vs. Theory

Typo.js is already in use in my Comment Snob extension. You can install it today to experience Typo.js in action, filtering comments on YouTube based on the number of spelling mistakes in each one.

What’s next for Typo.js?

The next step is adding support for returning spelling suggestions; right now, all Typo.js can do is tell you whether a word is spelled correctly or not. It also needs to support Hunspell’s compound word rules. These are the rules that a spellchecker uses to determine whether words like “100th”, “101st”, “102th” are correct spellings (yes, yes, and no, for those of you keeping track) since it would be impossible to precompute a list of all possible words of these forms.

The Typo.js code is available on GitHub. I welcome any and all suggestions or code contributions.

Standard
Browser Add-ons, Comment Snob, Google Chrome, Programming, Yahoo!, YouTube, YouTube Comment Snob

YouTube Comment Snob is now Comment Snob

In 2007, I wrote a Firefox add-on called YouTube Comment Snob. Its main function was to filter out the inanity from YouTube comment threads, and it worked (and still works) very well, but the comment I heard most frequently from people who tried it out was “Can you make this for the entire Web?” Until now, my answer has been, “No, not yet.” But now, my answer is “Very yes.”

Announcing Comment Snob

Comment Snob is an extension for Google Chrome that filters out undesirable comments from comment threads all over the Web.

Before: After:
YouTube (before Comment Snob) YouTube (after Comment Snob)

You can install it here. It still comes with support for YouTube built in, but you can add support for many other sites by installing Comment Snob rules.

What are Comment Snob Rules?

Comment Snob rules are JSON objects that dictate how Comment Snob finds and filters comments on different websites. Here’s the rule for YouTube that ships with Comment Snob:

{
	"id": "youtube@chrisfinke.com",
	"label": "YouTube",
	"url": "^http://www\\.youtube\\.com/.*$",
	"allCommentsSelector": "#comments-view",
	"commentContainerSelector": "li.comment",
	"commentTextSelector": "div.comment-text",
	"commentHideSelector": "> div",
	"statusElementTag": "div",
	"statusElementAttributes": {
		"class": "content",
		"style": "color: #666;"
	},
	"ajaxInitiatorSelector": ".comments-pagination button, .comments-pagination a, .comments-pagination button > span",
	"updateURL": "/comment-snob/rules/youtube.snob"
}

If you know HTML and understand how to use jQuery, you can write rules for Comment Snob. (Full instructions for writing rules are available here.)

For each rule that you install, you can choose a unique set of filtering rules:

Where Can I Install Rules?

I’ve written eight rules myself and made them available on this page (scroll down to “Featured Comment Snob Rules”); as other people write rules, I’ll link to them from that page as well. Eventually, I’ll have a proper site put together for showcasing the most popular rules.

Where Can I Install It?

Install it from the Google Chrome Extensions Gallery. It’s not available for Firefox yet, but I’ll most likely be releasing the next version for Chrome and Firefox simultaneously.

What’s Next?

This version of Comment Snob is just a shell of what my final vision is for comment filtering on the Web; right now, it’s all very manual, and the chances of false positives are too high for my taste. Adding a proper spellcheck filter will help that somewhat (Chrome doesn’t yet have a spellcheck API like Firefox does), but imagine a future where all comments on all websites could be filtered automatically based on their content, grammar, and keyword frequency, without having to account for personality differences between different websites. (e.g., The expected quality of a YouTube comment is much lower than the expected quality of a Hacker News comment, so Hacker News comments should be judged more stringently.) That starts to get close to what I want Comment Snob to be.

Standard