Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit fbf2d57

Browse files
dschokasal
authored andcommitted
Gitweb: make line number toggling work for Firefox and Safari
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 26eae79 commit fbf2d57

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gitweb/gitweb.perl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4558,7 +4558,9 @@ sub git_print_page_path {
45584558
e2.innerHTML = "[Hide line numbers]";
45594559
}
45604560
}
4561-
document.getElementsByTagName("head")[0].innerHTML += "<style id=\'lineNoStyle\'></style>";
4561+
var style = document.createElement("style");
4562+
style.setAttribute("id", "lineNoStyle");
4563+
document.getElementsByTagName("head")[0].appendChild(style);
45624564
toggleLineNumbers();
45634565
</script>
45644566
';

0 commit comments

Comments
 (0)