From d80a6bffe41fab648a02ba7216833845a0f700f7 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 0a130947fd..38a6df80a6 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -4317,7 +4317,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