diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2010-03-14 09:29:54 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2010-03-14 09:29:54 -0400 |
commit | 1bde001d3be2814c3e49d1927b22f2d15193b1d9 (patch) | |
tree | 88abea7597d3e8fa258001cc87d7a8aba2390609 /coverage/htmlfiles/coverage_html.js | |
parent | 3f43a51c7a1e4532d57dc3cd95fa6c4397c87f50 (diff) | |
download | python-coveragepy-git-1bde001d3be2814c3e49d1927b22f2d15193b1d9.tar.gz |
HTML line numbers are clickable, and highlight the line on arrival. Also, noticed that IE8 didn't line up the line number properly, so added an unfortunate meta tag to make it right. Closes issue #55.
Diffstat (limited to 'coverage/htmlfiles/coverage_html.js')
-rw-r--r-- | coverage/htmlfiles/coverage_html.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/coverage/htmlfiles/coverage_html.js b/coverage/htmlfiles/coverage_html.js index 2acba5c2..b6bde6ca 100644 --- a/coverage/htmlfiles/coverage_html.js +++ b/coverage/htmlfiles/coverage_html.js @@ -65,6 +65,14 @@ function index_page_ready($) { // -- pyfile stuff -- +function pyfile_ready($) { + // If we're directed to a particular line number, highlight the line. + var frag = location.hash; + if (frag.length > 2 && frag[1] == 'n') { + $(frag).addClass('highlight'); + } +} + function toggle_lines(btn, cls) { btn = $(btn); var hide = "hide_"+cls; |