[PATCH] graph: made the blinking "Javascript needed" static

Benoît Allard benoit at aeteurope.nl
Wed Oct 8 08:17:28 CDT 2008


Dirkjan Ochtman wrote:
> On Wed, Oct 8, 2008 at 14:02, Benoît Allard <benoit at aeteurope.nl> wrote:
>> Sadly, you're right ... They don't seems to process the noscript section ...
>>
>> Strange part is, in the changelog [1], they mention some bug fixes about
>> this section ... I can't make any sense of it ...
> 
> Maybe you can take it up with them? If it's fixed by them and
> released, we can change it in hgweb (since the updating mechanism for
> Fx extensions is pretty good anyway).

One more testing while sending them a mail shown me that my patch is 
working as expected ... Sorry for the noise ...

But my patch was breaking the test-suite anyway ... Attached updated 
patch updates the test-suite also.

Regards
Benoit

# HG changeset patch
# User Benoit Allard <benoit at aeteurope.nl>
# Date 1223390152 -7200
# Node ID 7660576f537dd52ce60f4dfb19ce5a696497e6b4
# Parent  070d038a50c52cedcdc8209895237744a045ce13
graph: removed the blinking No Javascript

diff -r 070d038a50c5 -r 7660576f537d templates/coal/graph.tmpl
--- a/templates/coal/graph.tmpl	Sun Oct 05 21:35:26 2008 +0200
+++ b/templates/coal/graph.tmpl	Tue Oct 07 16:35:52 2008 +0200
@@ -40,7 +40,7 @@
  | {changenav%navgraphentry}
  </div>

-<div id="noscript">The revision graph only works with 
JavaScript-enabled browsers.</div>
+<noscript>The revision graph only works with JavaScript-enabled 
browsers.</noscript>

  <div id="wrapper">
  <ul id="nodebgs"></ul>
@@ -51,8 +51,6 @@
  <script type="text/javascript" src="{staticurl}graph.js"></script>
  <script type="text/javascript">
  <!-- hide script content
-
-document.getElementById('noscript').style.display = 'none';

  var data = {jsdata|json};
  var graph = new Graph();
diff -r 070d038a50c5 -r 7660576f537d templates/gitweb/graph.tmpl
--- a/templates/gitweb/graph.tmpl	Sun Oct 05 21:35:26 2008 +0200
+++ b/templates/gitweb/graph.tmpl	Tue Oct 07 16:35:52 2008 +0200
@@ -32,7 +32,7 @@

  <div class="title">&nbsp;</div>

-<div id="noscript">The revision graph only works with 
JavaScript-enabled browsers.</div>
+<noscript>The revision graph only works with JavaScript-enabled 
browsers.</noscript>

  <div id="wrapper">
  <ul id="nodebgs"></ul>
@@ -43,8 +43,6 @@
  <script type="text/javascript" src="#staticurl#graph.js"></script>
  <script>
  <!-- hide script content
-
-document.getElementById('noscript').style.display = 'none';

  var data = {jsdata|json};
  var graph = new Graph();
diff -r 070d038a50c5 -r 7660576f537d templates/graph.tmpl
--- a/templates/graph.tmpl	Sun Oct 05 21:35:26 2008 +0200
+++ b/templates/graph.tmpl	Tue Oct 07 16:35:52 2008 +0200
@@ -26,7 +26,7 @@
  </p>
  </form>

-<div id="noscript">The revision graph only works with 
JavaScript-enabled browsers.</div>
+<noscript>The revision graph only works with JavaScript-enabled 
browsers.</noscript>

  <div id="wrapper">
  <ul id="nodebgs"></ul>
@@ -37,8 +37,6 @@
  <script type="text/javascript" src="#staticurl#graph.js"></script>
  <script type="text/javascript">
  <!-- hide script content
-
-document.getElementById('noscript').style.display = 'none';

  var data = {jsdata|json};
  var graph = new Graph();
diff -r 070d038a50c5 -r 7660576f537d tests/test-hgweb-commands.out
--- a/tests/test-hgweb-commands.out	Sun Oct 05 21:35:26 2008 +0200
+++ b/tests/test-hgweb-commands.out	Tue Oct 07 16:35:52 2008 +0200
@@ -518,7 +518,7 @@

  <div class="title">&nbsp;</div>

-<div id="noscript">The revision graph only works with 
JavaScript-enabled browsers.</div>
+<noscript>The revision graph only works with JavaScript-enabled 
browsers.</noscript>

  <div id="wrapper">
  <ul id="nodebgs"></ul>
@@ -529,8 +529,6 @@
  <script type="text/javascript" src="/static/graph.js"></script>
  <script>
  <!-- hide script content
-
-document.getElementById('noscript').style.display = 'none';

  var data = [["a4f92ed23982", [0, 1], [[0, 0, 1]], "Added tag 1.0 for 
changeset 2ef0ac749a14", "test", "long", ["default", true], ["tip"]], 
["2ef0ac749a14", [0, 1], [], "base", "test", "long", ["default", false], 
["1.0"]]];
  var graph = new Graph();

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4197 bytes
Desc: S/MIME Cryptographic Signature
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20081008/3e261331/attachment.bin 


More information about the Mercurial-devel mailing list