From f246c59ee8609337f1dfd160e7d05f967dd3d3b7 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 7 Sep 2010 16:58:16 +0200 Subject: [PATCH] Gitweb: make line number toggling work for Firefox and Safari Signed-off-by: Johannes Schindelin --- gitweb/gitweb.perl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 7e6cff0448..ec0f17b463 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -3849,7 +3849,9 @@ function toggleLineNumbers() { e2.innerHTML = "[Hide line numbers]"; } } -document.getElementsByTagName("head")[0].innerHTML += ""; +var style = document.createElement("style"); +style.setAttribute("id", "lineNoStyle"); +document.getElementsByTagName("head")[0].appendChild(style); toggleLineNumbers(); '; -- 2.11.4.GIT