In similar spirit to this question, I would like to tell the current tab to remove the very top page in the history from the stack, using an extension. The idea is to redirect (using the solution in the link) and then remove the "wrong" url from the stack to make browsing more intuitive.
Any ideas on how to do this?
I assume I'd have to do it in the background page as in the referenced solution, but I'm having trouble debugging things in the background page, so I can't figure out how to do things there....
Any help (either with the actual problem, or with how to debug the anonymous function in the bg.html) would be greatly appreciated.