Another poor soul here who can't make heads or tails of text replacement in Tampermonkey/Greasemonkey. I'm dealing with a series of table rows like so:
<table class="table table-striped table-hover">
<tr>
[a bunch of header cells]
</tr>
<tr>
<td>412</td>
<td>An image</td>
<td>A thing</td>
<td>A person</td>
<td>A place</td>
</tr>
<tr>
<td>3789</td>
<td>An image</td>
<td>A thing</td>
<td>A person</td>
<td>A place</td>
What I want is to turn each of the numbers into a link of this form:
<td><a href="https://mydomain.com/workflow/index.html?
endrun=1&submit=Edit&record=3789">3789</a></td>
(Line break after the ? is just so it will fit on the page here; there should not be an actual line break in the URL.)
There are multiple rows in the table; each one starts with a number that I would like to linkify. On some pages on the site, the number is the third or fourth item in each row rather than the first. Each page has only one table. I don't want to change the first cell in the header row, since those cells are already clickable and used for sorting, and I don't want to linkify any of the words--just the numbers.
I looked at Most concise way to do text replacement on a web page? (using GreaseMonkey) and How to create links from existing text in Greasemonkey? and Greasemonkey: Add a link in a table and http://www.overclock.net/t/487779/help-with-greasemonkey-and-regular-expressions but I can't quite figure out how to make any of the suggested answers work for my situation. (I'm running Tampermonkey in Chrome, but hoped Greasemonkey answers might work for me.) I would humbly appreciate any help.