No way this script EVER worked properly. Gotta love a script published that needs a total rewrite just to function as the proposed design.
Hint: all over where you're doing a test and regex on href.location......WTF would you possibly do that for since you're NOT TESTING THE ACTIVE LOCATION OR ACTIVITY, but a LIST OF HREF LINKS that NEVER EVEN GET PASSED TO YOUR FUNCTIONS! So, it's not just that camel changed a few things and broke something - the entire LOGIC of this thing is borked and I just don't think you could ever figure it out since I only see 3 scripts all trying to do this with links and NONE are correct.
In that case, save everyone the trouble and either don't post a NON WORKING script at all, or if you do then state it's NOT WORKING etc.
I'm annoyed because it is posted as a working script so I thought this was one I could possibly skip writing myself, but now that I began having to debug it, I'll be finishing up the complete rewrite I've already almost completed and publishing soon under my author acct. It literally doesn't look like a single line of this even needs to be kept in the rewrite, which is really telling.