Patchwork hgweb: call process_dates() via DOM event listener

login
register
mail settings
Submitter Gregory Szorc
Date Jan. 12, 2017, 3:38 a.m.
Message ID <79314c9a79b3aa033b6f.1484192297@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/18185/
State Accepted
Headers show

Comments

Gregory Szorc - Jan. 12, 2017, 3:38 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1484110068 28800
#      Tue Jan 10 20:47:48 2017 -0800
# Node ID 79314c9a79b3aa033b6f79d066b97d7157ecac33
# Parent  9cb0bb0f29f06fa88ac4f41d8743871b33c48548
hgweb: call process_dates() via DOM event listener

All the hgweb templates include mercurial.js in their header. All
the hgweb templates have the same <script> boilerplate to run
process_dates(). This patch factors that function call into
mercurial.js as part of a DOMContentLoaded event listener.
Augie Fackler - Jan. 12, 2017, 4 a.m.
On Wed, Jan 11, 2017 at 07:38:17PM -0800, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc@gmail.com>
> # Date 1484110068 28800
> #      Tue Jan 10 20:47:48 2017 -0800
> # Node ID 79314c9a79b3aa033b6f79d066b97d7157ecac33
> # Parent  9cb0bb0f29f06fa88ac4f41d8743871b33c48548
> hgweb: call process_dates() via DOM event listener

Queued this, thanks.

>
> All the hgweb templates include mercurial.js in their header. All
> the hgweb templates have the same <script> boilerplate to run
> process_dates(). This patch factors that function call into
> mercurial.js as part of a DOMContentLoaded event listener.
>
> diff --git a/mercurial/templates/gitweb/footer.tmpl b/mercurial/templates/gitweb/footer.tmpl
> --- a/mercurial/templates/gitweb/footer.tmpl
> +++ b/mercurial/templates/gitweb/footer.tmpl
> @@ -1,4 +1,3 @@
> -<script type="text/javascript">process_dates()</script>
>  <div class="page_footer">
>  <div class="page_footer_text">{repo|escape}</div>
>  <div class="rss_logo">
> diff --git a/mercurial/templates/gitweb/index.tmpl b/mercurial/templates/gitweb/index.tmpl
> --- a/mercurial/templates/gitweb/index.tmpl
> +++ b/mercurial/templates/gitweb/index.tmpl
> @@ -22,6 +22,5 @@
>  <div class="page_footer">
>  {motd}
>  </div>
> -<script type="text/javascript">process_dates()</script>
>  </body>
>  </html>
> diff --git a/mercurial/templates/monoblue/footer.tmpl b/mercurial/templates/monoblue/footer.tmpl
> --- a/mercurial/templates/monoblue/footer.tmpl
> +++ b/mercurial/templates/monoblue/footer.tmpl
> @@ -1,4 +1,3 @@
> -    <script type="text/javascript">process_dates()</script>
>      <div class="page-footer">
>          <p>Mercurial Repository: {repo|escape}</p>
>          <ul class="rss-logo">
> diff --git a/mercurial/templates/monoblue/index.tmpl b/mercurial/templates/monoblue/index.tmpl
> --- a/mercurial/templates/monoblue/index.tmpl
> +++ b/mercurial/templates/monoblue/index.tmpl
> @@ -30,6 +30,5 @@
>      </div>
>
>  </div>
> -<script type="text/javascript">process_dates()</script>
>  </body>
>  </html>
> diff --git a/mercurial/templates/paper/footer.tmpl b/mercurial/templates/paper/footer.tmpl
> --- a/mercurial/templates/paper/footer.tmpl
> +++ b/mercurial/templates/paper/footer.tmpl
> @@ -1,4 +1,3 @@
> -<script type="text/javascript">process_dates()</script>
>  {motd}
>
>  </body>
> diff --git a/mercurial/templates/spartan/footer.tmpl b/mercurial/templates/spartan/footer.tmpl
> --- a/mercurial/templates/spartan/footer.tmpl
> +++ b/mercurial/templates/spartan/footer.tmpl
> @@ -1,4 +1,3 @@
> -<script type="text/javascript">process_dates()</script>
>  {motd}
>  <div class="logo">
>  <a href="{logourl}">
> diff --git a/mercurial/templates/static/mercurial.js b/mercurial/templates/static/mercurial.js
> --- a/mercurial/templates/static/mercurial.js
> +++ b/mercurial/templates/static/mercurial.js
> @@ -433,3 +433,7 @@ function ajaxScrollInit(urlFormat,
>      window.addEventListener('resize', scrollHandler);
>      scrollHandler();
>  }
> +
> +document.addEventListener('DOMContentLoaded', function() {
> +   process_dates();
> +}, false);
> diff --git a/tests/test-help.t b/tests/test-help.t
> --- a/tests/test-help.t
> +++ b/tests/test-help.t
> @@ -2352,7 +2352,6 @@ Dish up an empty repo; serve it cold.
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -2527,7 +2526,6 @@ Dish up an empty repo; serve it cold.
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -2723,7 +2721,6 @@ Dish up an empty repo; serve it cold.
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -2818,7 +2815,6 @@ Dish up an empty repo; serve it cold.
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -2915,7 +2911,6 @@ Sub-topic indexes rendered properly
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -3154,7 +3149,6 @@ Sub-topic topics rendered properly
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> diff --git a/tests/test-hgweb-commands.t b/tests/test-hgweb-commands.t
> --- a/tests/test-hgweb-commands.t
> +++ b/tests/test-hgweb-commands.t
> @@ -829,7 +829,6 @@ Logs and changes
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -961,7 +960,6 @@ Logs and changes
>
>    </div>
>    </div>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -1068,7 +1066,6 @@ Logs and changes
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -1352,7 +1349,6 @@ File-related
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -1478,7 +1474,6 @@ File-related
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -1690,7 +1685,6 @@ Overviews
>      <td colspan="3"><a class="list" href="/branches?style=gitweb">...</a></td>
>    </tr>
>    </table>
> -  <script type="text/javascript">process_dates()</script>
>    <div class="page_footer">
>    <div class="page_footer_text">test</div>
>    <div class="rss_logo">
> @@ -1835,7 +1829,6 @@ Overviews
>        );
>    </script>
>
> -  <script type="text/javascript">process_dates()</script>
>    <div class="page_footer">
>    <div class="page_footer_text">test</div>
>    <div class="rss_logo">
> diff --git a/tests/test-hgweb-descend-empties.t b/tests/test-hgweb-descend-empties.t
> --- a/tests/test-hgweb-descend-empties.t
> +++ b/tests/test-hgweb-descend-empties.t
> @@ -139,7 +139,6 @@ manifest with descending (paper)
>    </table>
>    </div>
>    </div>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -259,7 +258,6 @@ manifest with descending (coal)
>    </table>
>    </div>
>    </div>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -360,7 +358,6 @@ manifest with descending (monoblue)
>
>        </table>
>
> -      <script type="text/javascript">process_dates()</script>
>        <div class="page-footer">
>            <p>Mercurial Repository: test</p>
>            <ul class="rss-logo">
> @@ -470,7 +467,6 @@ manifest with descending (gitweb)
>
>    </table>
>
> -  <script type="text/javascript">process_dates()</script>
>    <div class="page_footer">
>    <div class="page_footer_text">test</div>
>    <div class="rss_logo">
> @@ -551,7 +547,6 @@ manifest with descending (spartan)
>    </a>
>
>    </table>
> -  <script type="text/javascript">process_dates()</script>
>
>    <div class="logo">
>    <a href="https://mercurial-scm.org/">
> diff --git a/tests/test-hgweb-diffs.t b/tests/test-hgweb-diffs.t
> --- a/tests/test-hgweb-diffs.t
> +++ b/tests/test-hgweb-diffs.t
> @@ -162,7 +162,6 @@ revision
>
>    </div>
>    </div>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -299,7 +298,6 @@ diff removed file
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -442,7 +440,6 @@ revision
>
>    </div>
>    </div>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -579,7 +576,6 @@ diff modified file
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -703,7 +699,6 @@ comparison new file
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -837,7 +832,6 @@ comparison existing file
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -969,7 +963,6 @@ comparison removed file
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -1096,7 +1089,6 @@ comparison not-modified file
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> diff --git a/tests/test-hgweb-empty.t b/tests/test-hgweb-empty.t
> --- a/tests/test-hgweb-empty.t
> +++ b/tests/test-hgweb-empty.t
> @@ -109,7 +109,6 @@ Some tests for hgweb in an empty reposit
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -220,7 +219,6 @@ Some tests for hgweb in an empty reposit
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -374,7 +372,6 @@ Some tests for hgweb in an empty reposit
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -454,7 +451,6 @@ Some tests for hgweb in an empty reposit
>    </table>
>    </div>
>    </div>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> diff --git a/tests/test-hgweb-filelog.t b/tests/test-hgweb-filelog.t
> --- a/tests/test-hgweb-filelog.t
> +++ b/tests/test-hgweb-filelog.t
> @@ -242,7 +242,6 @@ tip - two revisions
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -362,7 +361,6 @@ second version - two revisions
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -474,7 +472,6 @@ first deleted - one revision
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -586,7 +583,6 @@ first version - one revision
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -651,7 +647,6 @@ before addition - error
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -757,7 +752,6 @@ should show base link, use spartan becau
>
>
>
> -  <script type="text/javascript">process_dates()</script>
>
>    <div class="logo">
>    <a href="https://mercurial-scm.org/">
> diff --git a/tests/test-hgweb-removed.t b/tests/test-hgweb-removed.t
> --- a/tests/test-hgweb-removed.t
> +++ b/tests/test-hgweb-removed.t
> @@ -131,7 +131,6 @@ revision
>
>    </div>
>    </div>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -235,7 +234,6 @@ diff removed file
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> diff --git a/tests/test-hgweb.t b/tests/test-hgweb.t
> --- a/tests/test-hgweb.t
> +++ b/tests/test-hgweb.t
> @@ -99,7 +99,6 @@ should give a 404 - static file that doe
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -207,7 +206,6 @@ should give a 404 - file does not exist
>    </div>
>    </div>
>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -318,7 +316,6 @@ try bad style
>    </table>
>    </div>
>    </div>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> diff --git a/tests/test-hgwebdir.t b/tests/test-hgwebdir.t
> --- a/tests/test-hgwebdir.t
> +++ b/tests/test-hgwebdir.t
> @@ -898,7 +898,6 @@ should succeed, slashy names
>    </table>
>    </div>
>    </div>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -969,7 +968,6 @@ should succeed, slashy names
>    </table>
>    </div>
>    </div>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> @@ -1407,7 +1405,6 @@ test inexistent and inaccessible repo sh
>    </table>
>    </div>
>    </div>
> -  <script type="text/javascript">process_dates()</script>
>
>
>    </body>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Anton Shestakov - Jan. 12, 2017, 5:43 a.m.
On Wed, 11 Jan 2017 19:38:17 -0800
Gregory Szorc <gregory.szorc@gmail.com> wrote:

> # HG changeset patch
> # User Gregory Szorc <gregory.szorc@gmail.com>
> # Date 1484110068 28800
> #      Tue Jan 10 20:47:48 2017 -0800
> # Node ID 79314c9a79b3aa033b6f79d066b97d7157ecac33
> # Parent  9cb0bb0f29f06fa88ac4f41d8743871b33c48548
> hgweb: call process_dates() via DOM event listener
> 
> All the hgweb templates include mercurial.js in their header. All
> the hgweb templates have the same <script> boilerplate to run
> process_dates(). This patch factors that function call into
> mercurial.js as part of a DOMContentLoaded event listener.
> 
> diff --git a/mercurial/templates/static/mercurial.js b/mercurial/templates/static/mercurial.js
> --- a/mercurial/templates/static/mercurial.js
> +++ b/mercurial/templates/static/mercurial.js
> @@ -433,3 +433,7 @@ function ajaxScrollInit(urlFormat,
>      window.addEventListener('resize', scrollHandler);
>      scrollHandler();
>  }
> +
> +document.addEventListener('DOMContentLoaded', function() {
> +   process_dates();
> +}, false);

Nit: any particular reason for the third argument (false) to be here at
all? If I'm reading [1] correctly, useCapture already defaults to false.

[1]: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
Gregory Szorc - Jan. 12, 2017, 6:03 a.m.
> On Jan 11, 2017, at 21:43, Anton Shestakov <av6@dwimlabs.net> wrote:
> 
> On Wed, 11 Jan 2017 19:38:17 -0800
> Gregory Szorc <gregory.szorc@gmail.com> wrote:
> 
>> # HG changeset patch
>> # User Gregory Szorc <gregory.szorc@gmail.com>
>> # Date 1484110068 28800
>> #      Tue Jan 10 20:47:48 2017 -0800
>> # Node ID 79314c9a79b3aa033b6f79d066b97d7157ecac33
>> # Parent  9cb0bb0f29f06fa88ac4f41d8743871b33c48548
>> hgweb: call process_dates() via DOM event listener
>> 
>> All the hgweb templates include mercurial.js in their header. All
>> the hgweb templates have the same <script> boilerplate to run
>> process_dates(). This patch factors that function call into
>> mercurial.js as part of a DOMContentLoaded event listener.
>> 
>> diff --git a/mercurial/templates/static/mercurial.js b/mercurial/templates/static/mercurial.js
>> --- a/mercurial/templates/static/mercurial.js
>> +++ b/mercurial/templates/static/mercurial.js
>> @@ -433,3 +433,7 @@ function ajaxScrollInit(urlFormat,
>>     window.addEventListener('resize', scrollHandler);
>>     scrollHandler();
>> }
>> +
>> +document.addEventListener('DOMContentLoaded', function() {
>> +   process_dates();
>> +}, false);
> 
> Nit: any particular reason for the third argument (false) to be here at
> all? If I'm reading [1] correctly, useCapture already defaults to false.

Old habit.

> 
> [1]: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener

Patch

diff --git a/mercurial/templates/gitweb/footer.tmpl b/mercurial/templates/gitweb/footer.tmpl
--- a/mercurial/templates/gitweb/footer.tmpl
+++ b/mercurial/templates/gitweb/footer.tmpl
@@ -1,4 +1,3 @@ 
-<script type="text/javascript">process_dates()</script>
 <div class="page_footer">
 <div class="page_footer_text">{repo|escape}</div>
 <div class="rss_logo">
diff --git a/mercurial/templates/gitweb/index.tmpl b/mercurial/templates/gitweb/index.tmpl
--- a/mercurial/templates/gitweb/index.tmpl
+++ b/mercurial/templates/gitweb/index.tmpl
@@ -22,6 +22,5 @@ 
 <div class="page_footer">
 {motd}
 </div>
-<script type="text/javascript">process_dates()</script>
 </body>
 </html>
diff --git a/mercurial/templates/monoblue/footer.tmpl b/mercurial/templates/monoblue/footer.tmpl
--- a/mercurial/templates/monoblue/footer.tmpl
+++ b/mercurial/templates/monoblue/footer.tmpl
@@ -1,4 +1,3 @@ 
-    <script type="text/javascript">process_dates()</script>
     <div class="page-footer">
         <p>Mercurial Repository: {repo|escape}</p>
         <ul class="rss-logo">
diff --git a/mercurial/templates/monoblue/index.tmpl b/mercurial/templates/monoblue/index.tmpl
--- a/mercurial/templates/monoblue/index.tmpl
+++ b/mercurial/templates/monoblue/index.tmpl
@@ -30,6 +30,5 @@ 
     </div>
 
 </div>
-<script type="text/javascript">process_dates()</script>
 </body>
 </html>
diff --git a/mercurial/templates/paper/footer.tmpl b/mercurial/templates/paper/footer.tmpl
--- a/mercurial/templates/paper/footer.tmpl
+++ b/mercurial/templates/paper/footer.tmpl
@@ -1,4 +1,3 @@ 
-<script type="text/javascript">process_dates()</script>
 {motd}
 
 </body>
diff --git a/mercurial/templates/spartan/footer.tmpl b/mercurial/templates/spartan/footer.tmpl
--- a/mercurial/templates/spartan/footer.tmpl
+++ b/mercurial/templates/spartan/footer.tmpl
@@ -1,4 +1,3 @@ 
-<script type="text/javascript">process_dates()</script>
 {motd}
 <div class="logo">
 <a href="{logourl}">
diff --git a/mercurial/templates/static/mercurial.js b/mercurial/templates/static/mercurial.js
--- a/mercurial/templates/static/mercurial.js
+++ b/mercurial/templates/static/mercurial.js
@@ -433,3 +433,7 @@  function ajaxScrollInit(urlFormat,
     window.addEventListener('resize', scrollHandler);
     scrollHandler();
 }
+
+document.addEventListener('DOMContentLoaded', function() {
+   process_dates();
+}, false);
diff --git a/tests/test-help.t b/tests/test-help.t
--- a/tests/test-help.t
+++ b/tests/test-help.t
@@ -2352,7 +2352,6 @@  Dish up an empty repo; serve it cold.
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -2527,7 +2526,6 @@  Dish up an empty repo; serve it cold.
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -2723,7 +2721,6 @@  Dish up an empty repo; serve it cold.
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -2818,7 +2815,6 @@  Dish up an empty repo; serve it cold.
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -2915,7 +2911,6 @@  Sub-topic indexes rendered properly
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -3154,7 +3149,6 @@  Sub-topic topics rendered properly
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
diff --git a/tests/test-hgweb-commands.t b/tests/test-hgweb-commands.t
--- a/tests/test-hgweb-commands.t
+++ b/tests/test-hgweb-commands.t
@@ -829,7 +829,6 @@  Logs and changes
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -961,7 +960,6 @@  Logs and changes
   
   </div>
   </div>
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -1068,7 +1066,6 @@  Logs and changes
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -1352,7 +1349,6 @@  File-related
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -1478,7 +1474,6 @@  File-related
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -1690,7 +1685,6 @@  Overviews
     <td colspan="3"><a class="list" href="/branches?style=gitweb">...</a></td>
   </tr>
   </table>
-  <script type="text/javascript">process_dates()</script>
   <div class="page_footer">
   <div class="page_footer_text">test</div>
   <div class="rss_logo">
@@ -1835,7 +1829,6 @@  Overviews
       );
   </script>
   
-  <script type="text/javascript">process_dates()</script>
   <div class="page_footer">
   <div class="page_footer_text">test</div>
   <div class="rss_logo">
diff --git a/tests/test-hgweb-descend-empties.t b/tests/test-hgweb-descend-empties.t
--- a/tests/test-hgweb-descend-empties.t
+++ b/tests/test-hgweb-descend-empties.t
@@ -139,7 +139,6 @@  manifest with descending (paper)
   </table>
   </div>
   </div>
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -259,7 +258,6 @@  manifest with descending (coal)
   </table>
   </div>
   </div>
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -360,7 +358,6 @@  manifest with descending (monoblue)
           
       </table>
   
-      <script type="text/javascript">process_dates()</script>
       <div class="page-footer">
           <p>Mercurial Repository: test</p>
           <ul class="rss-logo">
@@ -470,7 +467,6 @@  manifest with descending (gitweb)
   
   </table>
   
-  <script type="text/javascript">process_dates()</script>
   <div class="page_footer">
   <div class="page_footer_text">test</div>
   <div class="rss_logo">
@@ -551,7 +547,6 @@  manifest with descending (spartan)
   </a>
   
   </table>
-  <script type="text/javascript">process_dates()</script>
   
   <div class="logo">
   <a href="https://mercurial-scm.org/">
diff --git a/tests/test-hgweb-diffs.t b/tests/test-hgweb-diffs.t
--- a/tests/test-hgweb-diffs.t
+++ b/tests/test-hgweb-diffs.t
@@ -162,7 +162,6 @@  revision
   
   </div>
   </div>
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -299,7 +298,6 @@  diff removed file
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -442,7 +440,6 @@  revision
   
   </div>
   </div>
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -579,7 +576,6 @@  diff modified file
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -703,7 +699,6 @@  comparison new file
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -837,7 +832,6 @@  comparison existing file
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -969,7 +963,6 @@  comparison removed file
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -1096,7 +1089,6 @@  comparison not-modified file
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
diff --git a/tests/test-hgweb-empty.t b/tests/test-hgweb-empty.t
--- a/tests/test-hgweb-empty.t
+++ b/tests/test-hgweb-empty.t
@@ -109,7 +109,6 @@  Some tests for hgweb in an empty reposit
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -220,7 +219,6 @@  Some tests for hgweb in an empty reposit
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -374,7 +372,6 @@  Some tests for hgweb in an empty reposit
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -454,7 +451,6 @@  Some tests for hgweb in an empty reposit
   </table>
   </div>
   </div>
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
diff --git a/tests/test-hgweb-filelog.t b/tests/test-hgweb-filelog.t
--- a/tests/test-hgweb-filelog.t
+++ b/tests/test-hgweb-filelog.t
@@ -242,7 +242,6 @@  tip - two revisions
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -362,7 +361,6 @@  second version - two revisions
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -474,7 +472,6 @@  first deleted - one revision
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -586,7 +583,6 @@  first version - one revision
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -651,7 +647,6 @@  before addition - error
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -757,7 +752,6 @@  should show base link, use spartan becau
   
   
   
-  <script type="text/javascript">process_dates()</script>
   
   <div class="logo">
   <a href="https://mercurial-scm.org/">
diff --git a/tests/test-hgweb-removed.t b/tests/test-hgweb-removed.t
--- a/tests/test-hgweb-removed.t
+++ b/tests/test-hgweb-removed.t
@@ -131,7 +131,6 @@  revision
   
   </div>
   </div>
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -235,7 +234,6 @@  diff removed file
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
diff --git a/tests/test-hgweb.t b/tests/test-hgweb.t
--- a/tests/test-hgweb.t
+++ b/tests/test-hgweb.t
@@ -99,7 +99,6 @@  should give a 404 - static file that doe
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -207,7 +206,6 @@  should give a 404 - file does not exist
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -318,7 +316,6 @@  try bad style
   </table>
   </div>
   </div>
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
diff --git a/tests/test-hgwebdir.t b/tests/test-hgwebdir.t
--- a/tests/test-hgwebdir.t
+++ b/tests/test-hgwebdir.t
@@ -898,7 +898,6 @@  should succeed, slashy names
   </table>
   </div>
   </div>
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -969,7 +968,6 @@  should succeed, slashy names
   </table>
   </div>
   </div>
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>
@@ -1407,7 +1405,6 @@  test inexistent and inaccessible repo sh
   </table>
   </div>
   </div>
-  <script type="text/javascript">process_dates()</script>
   
   
   </body>