Yep, you're basically on the right track, assuming I am that is.
Basically the script uses the page's URL as the name of the corresponding cookie, and URLs with parameters added may wreck things. Try replacing the below line in the .js file:
Code:
var uniquepageid=window.location.href.replace("http://"+window.location.hostname, "").replace(/^\//, "")
with the below instead:
Code:
var uniquepageid=window.location.pathname+(window.location.href.split("=")[1] || "")
Untested, but has a good shot at working.
Bookmarks