From fa576dd82805b1fc2b35f69b304350035c20e48d 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 4fdf786e0b..87ba22b495 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -4478,7 +4478,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