I'm trying not to look into SlammedDime's mod really. Perhaps out of pride -- because I had issues with the guy before. Also because I don't feel like reinventing something that works (albeit is a bit complicated...). I didn't write PrettyURLs either. I just know it well enough to fix its bugs as fast as needed.
Anyway, err... Apart from that, I don't really know where to start here. Just wanted to mention that with my 'simpler' regex, at least I get to easily change ANY url in the page and that works for JavaScript too... Just look at action menus, usually they wouldn't use transformed URLs ;) (The only thing to remember is to allow for %a-z or something in any string where you're expecting digits, since usually you'll get myvariable=%var% in JS and you want to replace these without breaking them... (It's different for topic IDs though. Can't really replace these :P)
Anyway, err... Apart from that, I don't really know where to start here. Just wanted to mention that with my 'simpler' regex, at least I get to easily change ANY url in the page and that works for JavaScript too... Just look at action menus, usually they wouldn't use transformed URLs ;) (The only thing to remember is to allow for %a-z or something in any string where you're expecting digits, since usually you'll get myvariable=%var% in JS and you want to replace these without breaking them... (It's different for topic IDs though. Can't really replace these :P)