summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-01-28 00:36:38 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2010-01-28 00:36:38 +0100
commit708125327434ec851100f2df1dbbaca241317b7f (patch)
treebd76e66b3a11b8c9fb83b9adbca7032c660377f4 /static
parent990a5db0a543c4d69a58ee8a0046adee1c9efbc5 (diff)
Implemented dynamic highlighting of lines.
This currently only works when opening URLs with an anchor.
Diffstat (limited to 'static')
-rw-r--r--static/paste.css1
-rw-r--r--static/view.js5
2 files changed, 6 insertions, 0 deletions
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';
+}