JSFiddle - React, Tailwind, and code Playground

HTML

<a href="http://www.google.com/page=438985&view=49834">URL</a>
<a href="http://www.google.com/document/page=438985/field&view=49834&DONE">redirect URL</a>

JavaScript

var links = document.getElementsByTagName('a');
for(var i = links.length - 1; i >= 0; i--) {
	if(links[i] && links[i].href) {
		links[i].href = links[i].href.replace(/http:\/\/www\.google\.com\/page=(\d+)&view=(\d+)/,
                        'http://www.google.com/document/page=$1/field&view=$2&DONE');
	}
}