First off, I’d like to point out that it’s a bad idea to be writing anything at 2am. This is generally what happens when I sit down after work to work on something — before I know it, it is 2am and I go to bed leaving things in some completely whacked out state.
A week or so ago I sat down and implemented a big chunk of my Netflix Queue Extender greasemonkey script, but got stuck somewhere and promptly forgot about it after going to bed. Today I loaded up my netflix queue for the first time since then, completely forgetting that I put an “alert(movieTitle);” in just the wrong spot, causing it to pop up a dialog with the title of the movie for each item in your queue. As I have 351 things currently in the queue I was viewing, this was a bad thing.
You might say “Jer, clicking ‘OK’ 351 times isn’t really a big deal,” to which I would have to respond pointing out some further idiocy. My script is loading a list I have on listology.com that currently has about 25 things in it, and inserts it into the netflix queue page. Apparently I goofed somewhere, because it isn’t popping up a dialog for each movie in my queue, it is popping up a dialog for each movie in my queue for each item in my listology.com list. Yup, 25 × 351 = 8,775 ‘OK’ dialogs.
I had important stuff open in other tabs, so closing out firefox wasn’t really a viable option, so I opted for the old “stick a beer bottle on the Enter key and walk away’ method. Let’s just say firefox doesn’t like opening that many dialogs in a row. Somewhere after 3,000 of them firefox started doing very odd things, which eventually needed to be stopped by killing it.
So on with the update. I discovered that it doesn’t really matter that listology.com requires approval to view posts — I just use the edit url rather than the view url to obtain the contents of the list. The list actually updates right away, it just doesn’t show up when ‘viewing’ the list until after moderation. With the ‘edit’ link you can see it right away. That’s one problem down.
I have it inserting a new DIV element containing the list of movies from your listology.com list into the Netflix page right below your queue. Here’s a little screenshot so you can see the injected content:

I obviously haven’t done any formatting yet, and they don’t yet actually link to anything when you click them. Where I got stuck is with a function that handles Netflix searching. Basically, my idea is like this: You have a list of movies on listology.com that contains the name of the movie and year. (I was working using
the list that Becky from
NetflixFan has containing her overflow.) For each item in the list it would do a netflix search, parse the results of the search looking for the combination of the same title and the same year, then when finding it store the netflix ID for that movie into a variable to use when constructing the ‘Add to Queue’ link. It would then add the movie’s ID to the entry in the listology.com list so that next time through it doesn’t need to bother searching to make the link.
I think the problem I’m running into has a simple fix, I’m just a little afraid of sitting down to fix it because it will once again be 2am and I’ll have to quit in some random state again.