Netflix Queue Manager v.3.0
Greasemonkey update
Now that the Manager has reached a point of functional stability, it has become more practical to provide a consolidated version of the script. This removes the externally hosted script injection used by the bookmarklet version, and directly embeds the code from the toolman and manager scripts in the Greasemonkey script.
Warning: the original 3.0 version does not work with the latest Greasemonkey release (.51). If you have upgraded to GM .51 then repeat the Manager script install. I’ve replaced it with v. 3.01 which should work OK. This version does not appear to work with Turnabout .31, so if you are trying to use that then you’ll have to stick with the older version of the Manager.
changes
So there are no new features being added in this version. The base netflix-manager.js script has been updated to keep the code compatible with the new Greasemonkey version. Basically, the handler functions have been added to the window scope, so that they can be called once the Greasemonkey load has completed.
There are a few benefits to using this new version:
- Improved performance — the switch from the standard queue to the Manager happens more quickly, and there is no visible intermedieate state. Since the full script code is no longer being loaded from an external host there is a one or two second quicker response.
- The ability to have a fixed installation, addressing the security concerns that a few people have expressed. The paranoid can now examine the code, mentally certify it, and not have to worry about a different version running later. It should be noted, however, that this is potentially more risky than running the externally hosted version. Greasemonkey opens up a lot more potential holes than you have from the normal browser javascript. Externally loaded scripts do not have any access to the internal GM functions that are so risky, so even though you may not know what is being run, the code is effectively “sandboxed” to the current page. With the embedded version you’re now responsible for checking the 1200 lines of code to see that it doesn’t exploit any of the doors that GM opens. Keep in mind though that the script only runs on the Netflix queue page, which doesn’t contain any sensitive information.
- Availability — with all the required code now embedded in your browser you will be able to use the Manager even if badsegue.org is down.
upgrades
One of the drawbacks of not using externally hosted scripts is the ability to deploy updates transparently. There have been frequent updates to the code throughout its life, and none has required a user to re-install. This version loses that benefit. But the feature set is stable and there are no bugs that I am aware of, so it seems safe to make this version available. The biggest risk is if Netflix makes a change to their queue page that makes the Manager inoperable.
To compensate for the deployment issue, an upgrade notification mechanism has been added. When a new version is available you will see an indicator, and can upgrade with just a few clicks.
should you upgrade?
The older, non-embedded version of the Manager will work with any GM version, so you can stick with that. This newer version is more susceptible to GM changes, which may cause the manager not to operate correctly. I will try to keep the scripts functional with the latest GM versions.
installation
Use the link below, right-click and select Install User Script. If you are unfamiliar with installing Greasemonkey scripts, refer to the instructions and installation page.
Netflix Queue Manager
Full instructions on installation and usage is located here.
Hey, awesome that you’re making this available “embedded”. That should give your server some rest :-)
But I wanted to let you know that
window.foo = function() {}
does not work anymore in Deer Park (which will be FF 1.5). So if you want your script to work for people who use Deer Park beta, or 1.5 when it ships, then you need to fix that.
The easiest way is to just use closure to get to your functions and avoid using string-based event handlers.
For example, you do this:
html += “…”
Instead do this:
html += “…”;
then, after you inject it (with innerHTML or whatever), get a refernece to the node and add the click handler using DOM apis:
var li = fooNode.getElementsByTagName(”li”)[0];
li.addEventListener(”click”, doSomething, false);
The reference to doSomething will resolve to regular plain old functions, you don’t need to add them to window. Any functions you add to window will do nothing in Deer Park so watch out for that.
I know it looks more verbose, but once you get the hang of it, it really is much nicer not having to deal with all those string escaping quote issues.
If you need help, hit up the mailing list — http://greasemonkey.mozdev.org/list.html
Comment by Aaron — August 22, 2005 @ 5:51 amUgh, I got escapified… that was supposed to be:
For example, you do this:
html += “[li onclick=’doSomething()’]..[/li]”
Instead do this:
html += [li]…[/li]
Comment by Aaron — August 22, 2005 @ 5:58 amoh, good. for the last month, since installing the beta greasemonkey update, I’ve been assuming that I broke my install and that’s why it wasn’t working :) Thanks for fixing this, and also for embedding the code.
Comment by jason — August 29, 2005 @ 2:56 amJust as an FYI, with the 1.5 beta of Firefox, and the 0.6.2 version of Greasemonkey (see Greasblog for details, the Queue Manager doesn’t show up at all. I’m using the latest from userscripts.org.
Roger
Comment by Roger Weeks — September 17, 2005 @ 3:08 am