hgweb: bring back infinite scroll in shortlog of paper style
Since
fdf7794be41d, column headers are wrapped by <thead> element, so the first
and only <tbody> contains changelog data. I got the following error without
this patch:
Uncaught TypeError: Cannot read property 'lastElementChild' of null
scrollHandler @ mercurial.js:375
--- a/mercurial/templates/paper/shortlog.tmpl Wed May 06 09:52:10 2015 -0700
+++ b/mercurial/templates/paper/shortlog.tmpl Thu May 07 07:46:39 2015 +0900
@@ -80,7 +80,7 @@
var m = htmlText.match(/'(\w+)', <!-- NEXTHASH/);
return m ? m[1] : null;
},
- '.bigtable > tbody:nth-of-type(2)',
+ '.bigtable > tbody',
'<tr class="%class%">\\
<td colspan="3" style="text-align: center;">%text%</td>\\
</tr>'
--- a/tests/test-hgweb-commands.t Wed May 06 09:52:10 2015 -0700
+++ b/tests/test-hgweb-commands.t Thu May 07 07:46:39 2015 +0900
@@ -797,7 +797,7 @@
var m = htmlText.match(/'(\w+)', <!-- NEXTHASH/);
return m ? m[1] : null;
},
- '.bigtable > tbody:nth-of-type(2)',
+ '.bigtable > tbody',
'<tr class="%class%">\
<td colspan="3" style="text-align: center;">%text%</td>\
</tr>'
--- a/tests/test-hgweb-empty.t Wed May 06 09:52:10 2015 -0700
+++ b/tests/test-hgweb-empty.t Thu May 07 07:46:39 2015 +0900
@@ -99,7 +99,7 @@
var m = htmlText.match(/'(\w+)', <!-- NEXTHASH/);
return m ? m[1] : null;
},
- '.bigtable > tbody:nth-of-type(2)',
+ '.bigtable > tbody',
'<tr class="%class%">\
<td colspan="3" style="text-align: center;">%text%</td>\
</tr>'
@@ -210,7 +210,7 @@
var m = htmlText.match(/'(\w+)', <!-- NEXTHASH/);
return m ? m[1] : null;
},
- '.bigtable > tbody:nth-of-type(2)',
+ '.bigtable > tbody',
'<tr class="%class%">\
<td colspan="3" style="text-align: center;">%text%</td>\
</tr>'