summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2010-04-07 14:36:26 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2010-04-07 14:36:26 +0200
commit43e31734bec0ce4fb6a237fc24652ab76ea9b25a (patch)
treedaebefc6760f22fe35083e6404e5c917e1936860
parentf7462922fca48ca6a2f2bbc9ee3511fcec2b0d1c (diff)
downloadweb-43e31734bec0ce4fb6a237fc24652ab76ea9b25a.tar.gz
web-43e31734bec0ce4fb6a237fc24652ab76ea9b25a.tar.bz2
web-43e31734bec0ce4fb6a237fc24652ab76ea9b25a.zip
Sanitized JS
-rw-r--r--static/css/style.css2
-rw-r--r--static/js/toc.js27
2 files changed, 14 insertions, 15 deletions
diff --git a/static/css/style.css b/static/css/style.css
index c75427c..26900e0 100644
--- a/static/css/style.css
+++ b/static/css/style.css
@@ -234,7 +234,7 @@ img.right {
/* Table of contents */
-#contentheader {
+#tocheader {
display: none;
}
diff --git a/static/js/toc.js b/static/js/toc.js
index 5fbba70..5ef8545 100644
--- a/static/js/toc.js
+++ b/static/js/toc.js
@@ -1,17 +1,16 @@
function createToc(pages) {
- var tdiv = document.getElementById("toc");
- if (tdiv)
- {
- var a = tdiv.appendChild(document.createElement('span'));
- // a.onclick = showhideToc;
- a.id = 'contentheader';
- a.innerHTML = 'Contents';
+ var tdiv = document.getElementById('toc');
+ if (tdiv) {
+ var header = tdiv.appendChild(document.createElement('span'));
+ // header.onclick = showhideToc;
+ header.id = 'tocheader';
+ header.innerHTML = 'Contents';
- var ldiv = tdiv.appendChild(document.createElement('ul'));
- ldiv.id = 'innertoc';
+ var tul = tdiv.appendChild(document.createElement('ul'));
+ tul.id = 'innertoc';
for (key in pages) {
- var link = ldiv.appendChild(document.createElement('li')).appendChild(document.createElement('a'));
+ var link = tul.appendChild(document.createElement('li')).appendChild(document.createElement('a'));
link.innerHTML = pages[key];
link.className = 'tocLink';
link.href = '#' + key;
@@ -24,8 +23,8 @@ function createToc(pages) {
var TocState = 'none';
function showhideToc() {
- TocState = (TocState == 'none') ? 'block' : 'none';
- var newText = (TocState == 'none') ? 'show page contents' : 'hide page contents';
- document.getElementById('contentheader').innerHTML = newText;
- document.getElementById('innertoc').style.display = TocState;
+ TocState = (TocState == 'none') ? 'block' : 'none';
+ var newText = (TocState == 'none') ? 'show page contents' : 'hide page contents';
+ document.getElementById('tocheader').innerHTML = newText;
+ document.getElementById('innertoc').style.display = TocState;
}