Adrià Vilanova MartÃnez | f19ea43 | 2024-01-23 20:20:52 +0100 | [diff] [blame^] | 1 | <!DOCTYPE html> |
| 2 | <script> |
| 3 | const commentRegexp = /#c([0-9]+)/; |
| 4 | const url = {{ base_url|tojson }} |
| 5 | let hash = window.location.hash; |
| 6 | |
| 7 | // If a monorail style comment is specified then convert it to an |
| 8 | // issue tracker style comment. Increment it by one because issue |
| 9 | // tracker considers the description as the first comment. |
| 10 | const matches = hash.match(commentRegexp); |
| 11 | if (matches) { |
| 12 | let commentNum = parseInt(matches[1]); |
| 13 | hash = hash.replace("#c" + commentNum, "#comment" + (commentNum+1)); |
| 14 | } |
| 15 | window.location = url + hash; |
| 16 | </script> |