From 708125327434ec851100f2df1dbbaca241317b7f Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Thu, 28 Jan 2010 00:36:38 +0100 Subject: Implemented dynamic highlighting of lines. This currently only works when opening URLs with an anchor. --- static/paste.css | 1 + static/view.js | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 static/view.js (limited to 'static') diff --git a/static/paste.css b/static/paste.css index 11e15a0..e2139be 100644 --- a/static/paste.css +++ b/static/paste.css @@ -16,3 +16,4 @@ div#alt-links a { color: #44f; } .highlighttable pre { margin: 0; padding: 0; } .highlighttable .linenos { text-align: right; padding-left: .5em; padding-right: .5em; } .highlighttable .linenos a { color: #888; } +.highlighttable .selected { display: block; background-color: #cfc; } diff --git a/static/view.js b/static/view.js new file mode 100644 index 0000000..c855609 --- /dev/null +++ b/static/view.js @@ -0,0 +1,5 @@ +window.onload = function() { + var line = 'code' + document.location.hash.substr(1); + var codeline = document.getElementById(line); + codeline.className = 'selected'; +} -- cgit v1.2.3