I think a slightly more practical approach would be to make an easily self-hosted web proxy with an accompanying Google Chrome (or other) extension that can rewrite all network requests.
Deleted comment
Glype [1] is an example of web proxy that provides rewriting and customizable plugins to improve compatibility with complex web apps. Not free software but comes with source code (PHP).