From 2ef6b15973290619fdcbda2e323dbb50224622cb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 25 Aug 2009 17:27:32 -0400 Subject: changelog and news file, also make postinst rebuild on upgrade --- debian/postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian/postinst') diff --git a/debian/postinst b/debian/postinst index 0a836a0b2..2ba26e5b6 100755 --- a/debian/postinst +++ b/debian/postinst @@ -4,7 +4,7 @@ set -e # Change this when some incompatible change is made that requires # rebuilding all wikis. -firstcompat=2.52 +firstcompat=3.1415926 if [ "$1" = configure ] && \ dpkg --compare-versions "$2" lt "$firstcompat"; then -- cgit v1.2.3 From a4df28f42a96a2412665fc9aeeccc93a160d02f3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Oct 2009 16:51:33 -0400 Subject: add rebuild handing --- debian/NEWS | 10 ++++++++++ debian/changelog | 2 ++ debian/postinst | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) (limited to 'debian/postinst') diff --git a/debian/NEWS b/debian/NEWS index 808105fd5..520f38815 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,3 +1,13 @@ +ikiwiki (3.14159266) UNRELEASED; urgency=low + + To take advantage of significant performance improvements, all + wikis need to be rebuilt on upgrade to this version. If you + listed your wiki in /etc/ikiwiki/wikilist this will be done + automatically when the Debian package is upgraded. Or use + ikiwiki-mass-rebuild to force a rebuild. + + -- Joey Hess Mon, 05 Oct 2009 16:48:59 -0400 + ikiwiki (3.1415926) unstable; urgency=low In order to fix a performance bug, all wikis need to be rebuilt on diff --git a/debian/changelog b/debian/changelog index ab235484d..89d377769 100644 --- a/debian/changelog +++ b/debian/changelog @@ -27,6 +27,8 @@ ikiwiki (3.14159266) UNRELEASED; urgency=low where if only a small set of pages were considered by orphans/pagestats, changes to links on other pages failed to cause an update. * Transitive dependencies are now correctly supported. + * Rebuild wikis on upgrade to this version to get improved dependency + info. -- Joey Hess Sun, 27 Sep 2009 17:40:03 -0400 diff --git a/debian/postinst b/debian/postinst index 2ba26e5b6..dd4be6e0e 100755 --- a/debian/postinst +++ b/debian/postinst @@ -4,7 +4,7 @@ set -e # Change this when some incompatible change is made that requires # rebuilding all wikis. -firstcompat=3.1415926 +firstcompat=3.14159266 if [ "$1" = configure ] && \ dpkg --compare-versions "$2" lt "$firstcompat"; then -- cgit v1.2.3 From 48178c48ed63f1004e44b2e7850bcef773f0a1e5 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 6 Apr 2010 20:59:45 +0100 Subject: Auto-rebuild wikis on upgrade due to the taglink change debian/NEWS and debian/postinst should be edited before release to have an appropriate version number. --- debian/NEWS | 10 ++++++++++ debian/postinst | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'debian/postinst') diff --git a/debian/NEWS b/debian/NEWS index 50332670f..afb3a8652 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,3 +1,13 @@ +ikiwiki (3.UNRELEASED) UNRELEASED; urgency=low + + Starting from this version, the tagged(x) pagespec only matches links that + were set up by the [[!tag]] or [[!taglink]] directives. To make this change, + all wikis need to be rebuilt on upgrade to this version. If you listed your + wiki in /etc/ikiwiki/wikilist this will be done automatically when the + Debian package is upgraded. Or use ikiwiki-mass-rebuild to force a rebuild. + + -- Simon McVittie Tue, 06 Apr 2010 20:53:07 +0100 + ikiwiki (3.20091017) unstable; urgency=low To take advantage of significant performance improvements, all diff --git a/debian/postinst b/debian/postinst index bf1825ab7..90b9e8a42 100755 --- a/debian/postinst +++ b/debian/postinst @@ -4,7 +4,7 @@ set -e # Change this when some incompatible change is made that requires # rebuilding all wikis. -firstcompat=3.20091010 +firstcompat=3.20100401 if [ "$1" = configure ] && \ dpkg --compare-versions "$2" lt "$firstcompat"; then -- cgit v1.2.3 From c0ca1967586234ae4e84e485af53804df2198bcd Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 6 Apr 2010 22:58:22 -0400 Subject: tweak wording and versions and add changelog entry --- debian/NEWS | 12 ++++++------ debian/changelog | 6 +++++- debian/postinst | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) (limited to 'debian/postinst') diff --git a/debian/NEWS b/debian/NEWS index afb3a8652..4e433fd37 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,10 +1,10 @@ -ikiwiki (3.UNRELEASED) UNRELEASED; urgency=low +ikiwiki (3.20100406) unstable; urgency=low - Starting from this version, the tagged(x) pagespec only matches links that - were set up by the [[!tag]] or [[!taglink]] directives. To make this change, - all wikis need to be rebuilt on upgrade to this version. If you listed your - wiki in /etc/ikiwiki/wikilist this will be done automatically when the - Debian package is upgraded. Or use ikiwiki-mass-rebuild to force a rebuild. + Starting from this version, the tagged() pagespec only matches tags, + not regular wikilinks. To support this change, all wikis need to be + rebuilt on upgrade to this version. If you listed your wiki in + /etc/ikiwiki/wikilist this will be done automatically when the Debian + package is upgraded. Or use ikiwiki-mass-rebuild to force a rebuild. -- Simon McVittie Tue, 06 Apr 2010 20:53:07 +0100 diff --git a/debian/changelog b/debian/changelog index 77d17f566..435b7982f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,12 @@ -ikiwiki (3.20100404) UNRELEASED; urgency=low +ikiwiki (3.20100406) UNRELEASED; urgency=low * bzr: Fix bzr log parsing to work with bzr 2.0. (liw) * comments: Fix missing entity encoding in title. * txt: Add a special case for robots.txt. + * Add support for link types, and make the the tagged() pagespec only + match tags, not regular links (a bugfix). + * Rebuild wikis on upgrade to this version to get tag link types recorded + correctly. -- Joey Hess Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/debian/postinst b/debian/postinst index 90b9e8a42..8eac26361 100755 --- a/debian/postinst +++ b/debian/postinst @@ -4,7 +4,7 @@ set -e # Change this when some incompatible change is made that requires # rebuilding all wikis. -firstcompat=3.20100401 +firstcompat=3.20100406 if [ "$1" = configure ] && \ dpkg --compare-versions "$2" lt "$firstcompat"; then -- cgit v1.2.3 From 61cbcb049fd1eb6a57ca2f51c78767a25d22820b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 10 Apr 2010 14:35:45 -0400 Subject: update changelog, update rebuild version --- debian/NEWS | 8 ++++---- debian/changelog | 4 +++- debian/postinst | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'debian/postinst') diff --git a/debian/NEWS b/debian/NEWS index b796154fa..25ebed0b4 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -8,10 +8,10 @@ ikiwiki (3.20100406) unstable; urgency=low not regular wikilinks. If your wiki accidentially relied on the old, buggy behavior, you might need to change pagespecs to use `link()`. - To support the above change, all wikis need to be rebuilt on upgrade to - this version. If you listed your wiki in /etc/ikiwiki/wikilist this will - be done automatically when the Debian package is upgraded. Or use - ikiwiki-mass-rebuild to force a rebuild. + Due to the above and other changes, all wikis need to be rebuilt on + upgrade to this version. If you listed your wiki in /etc/ikiwiki/wikilist + this will be done automatically when the Debian package is upgraded. Or + use ikiwiki-mass-rebuild to force a rebuild. -- Simon McVittie Tue, 06 Apr 2010 20:53:07 +0100 diff --git a/debian/changelog b/debian/changelog index e985a5da8..113138358 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ikiwiki (3.20100406) UNRELEASED; urgency=low +ikiwiki (3.20100410) UNRELEASED; urgency=low [ Joey Hess ] * bzr: Fix bzr log parsing to work with bzr 2.0. (liw) @@ -18,6 +18,8 @@ ikiwiki (3.20100406) UNRELEASED; urgency=low This can be used to get names sorted by last name without displaying them last name first. * sortnaturally: New plugin; the title_natural sort method has moved here. + * meta: store fields consistently unescaped, and escape on use + A wiki rebuild is also needed due to this change. [ Joey Hess ] * Update dependency for git-core to git transition. diff --git a/debian/postinst b/debian/postinst index 8eac26361..fa0591153 100755 --- a/debian/postinst +++ b/debian/postinst @@ -4,7 +4,7 @@ set -e # Change this when some incompatible change is made that requires # rebuilding all wikis. -firstcompat=3.20100406 +firstcompat=3.20100410 if [ "$1" = configure ] && \ dpkg --compare-versions "$2" lt "$firstcompat"; then -- cgit v1.2.3 From 0db4d920aafa0c7a6b53c59e2605230134ed45eb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 22 Apr 2010 00:28:58 -0400 Subject: force rebuild from pre 20100422 to ensure those wrong massive depends_simple don't linger on systems that rebuilt for the other reasons already --- debian/NEWS | 2 +- debian/changelog | 2 +- debian/postinst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'debian/postinst') diff --git a/debian/NEWS b/debian/NEWS index 9fd882ad2..2fbe0ea7b 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,4 +1,4 @@ -ikiwiki (3.20100406) unstable; urgency=low +ikiwiki (3.20100422) unstable; urgency=low This version of ikiwiki has a lot of changes that you need to know about. diff --git a/debian/changelog b/debian/changelog index 76405e7da..647124b8a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ikiwiki (3.20100415) UNRELEASED; urgency=low +ikiwiki (3.20100422) UNRELEASED; urgency=low [ Joey Hess ] * bzr: Fix bzr log parsing to work with bzr 2.0. (liw) diff --git a/debian/postinst b/debian/postinst index fa0591153..810b7cfe0 100755 --- a/debian/postinst +++ b/debian/postinst @@ -4,7 +4,7 @@ set -e # Change this when some incompatible change is made that requires # rebuilding all wikis. -firstcompat=3.20100410 +firstcompat=3.20100422 if [ "$1" = configure ] && \ dpkg --compare-versions "$2" lt "$firstcompat"; then -- cgit v1.2.3 From e90d67d3c9a93862657563e17e24054087f205d1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 24 Apr 2010 00:54:59 -0400 Subject: Moved javascript files under the ikiwiki/ directory, to avoid cluttering the top of the web root. This is another things that requires a wiki rebuild on upgrade to this version. --- IkiWiki/Plugin/relativedate.pm | 4 +- IkiWiki/Plugin/toggle.pm | 4 +- debian/changelog | 5 +- debian/postinst | 2 +- underlays/javascript/ikiwiki.js | 54 -------------------- underlays/javascript/ikiwiki/ikiwiki.js | 54 ++++++++++++++++++++ underlays/javascript/ikiwiki/relativedate.js | 76 ++++++++++++++++++++++++++++ underlays/javascript/ikiwiki/toggle.js | 29 +++++++++++ underlays/javascript/relativedate.js | 76 ---------------------------- underlays/javascript/toggle.js | 29 ----------- 10 files changed, 168 insertions(+), 165 deletions(-) delete mode 100644 underlays/javascript/ikiwiki.js create mode 100644 underlays/javascript/ikiwiki/ikiwiki.js create mode 100644 underlays/javascript/ikiwiki/relativedate.js create mode 100644 underlays/javascript/ikiwiki/toggle.js delete mode 100644 underlays/javascript/relativedate.js delete mode 100644 underlays/javascript/toggle.js (limited to 'debian/postinst') diff --git a/IkiWiki/Plugin/relativedate.pm b/IkiWiki/Plugin/relativedate.pm index 7f006af83..7e615f7f1 100644 --- a/IkiWiki/Plugin/relativedate.pm +++ b/IkiWiki/Plugin/relativedate.pm @@ -37,9 +37,9 @@ sub include_javascript ($;$) { my $page=shift; my $absolute=shift; - return ''."\n". - ''; } diff --git a/IkiWiki/Plugin/toggle.pm b/IkiWiki/Plugin/toggle.pm index f9c899540..3319421d9 100644 --- a/IkiWiki/Plugin/toggle.pm +++ b/IkiWiki/Plugin/toggle.pm @@ -81,9 +81,9 @@ sub include_javascript ($;$) { my $page=shift; my $absolute=shift; - return ''."\n". - ''; } diff --git a/debian/changelog b/debian/changelog index 0ab04f522..f9d012e42 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ikiwiki (3.20100422) UNRELEASED; urgency=low +ikiwiki (3.20100424) UNRELEASED; urgency=low [ Joey Hess ] * tag: Automatic creation of tag pages can now be enabled using @@ -66,6 +66,9 @@ ikiwiki (3.20100422) UNRELEASED; urgency=low (Jelmer Vernooij) * Quite a lot of new optimisations, and one major fix to a recent performance regression. + * Moved javascript files under the ikiwiki/ directory, to avoid cluttering + the top of the web root. This is another things that requires a wiki + rebuild on upgrade to this version. -- Joey Hess Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/debian/postinst b/debian/postinst index 810b7cfe0..76ad115ac 100755 --- a/debian/postinst +++ b/debian/postinst @@ -4,7 +4,7 @@ set -e # Change this when some incompatible change is made that requires # rebuilding all wikis. -firstcompat=3.20100422 +firstcompat=3.20100424 if [ "$1" = configure ] && \ dpkg --compare-versions "$2" lt "$firstcompat"; then diff --git a/underlays/javascript/ikiwiki.js b/underlays/javascript/ikiwiki.js deleted file mode 100644 index aebc5cf7e..000000000 --- a/underlays/javascript/ikiwiki.js +++ /dev/null @@ -1,54 +0,0 @@ -// ikiwiki's javascript utility function library - -var hooks; - -// Run onload as soon as the DOM is ready, if possible. -// gecko, opera 9 -if (document.addEventListener) { - document.addEventListener("DOMContentLoaded", run_hooks_onload, false); -} -// other browsers -window.onload = run_hooks_onload; - -var onload_done = 0; - -function run_hooks_onload() { - // avoid firing twice - if (onload_done) - return; - onload_done = true; - - run_hooks("onload"); -} - -function run_hooks(name) { - if (typeof(hooks) != "undefined") { - for (var i = 0; i < hooks.length; i++) { - if (hooks[i].name == name) { - hooks[i].call(); - } - } - } -} - -function hook(name, call) { - if (typeof(hooks) == "undefined") - hooks = new Array; - hooks.push({name: name, call: call}); -} - -function getElementsByClass(cls, node, tag) { - if (document.getElementsByClass) - return document.getElementsByClass(cls, node, tag); - if (! node) node = document; - if (! tag) tag = '*'; - var ret = new Array(); - var pattern = new RegExp("(^|\\s)"+cls+"(\\s|$)"); - var els = node.getElementsByTagName(tag); - for (i = 0; i < els.length; i++) { - if ( pattern.test(els[i].className) ) { - ret.push(els[i]); - } - } - return ret; -} diff --git a/underlays/javascript/ikiwiki/ikiwiki.js b/underlays/javascript/ikiwiki/ikiwiki.js new file mode 100644 index 000000000..aebc5cf7e --- /dev/null +++ b/underlays/javascript/ikiwiki/ikiwiki.js @@ -0,0 +1,54 @@ +// ikiwiki's javascript utility function library + +var hooks; + +// Run onload as soon as the DOM is ready, if possible. +// gecko, opera 9 +if (document.addEventListener) { + document.addEventListener("DOMContentLoaded", run_hooks_onload, false); +} +// other browsers +window.onload = run_hooks_onload; + +var onload_done = 0; + +function run_hooks_onload() { + // avoid firing twice + if (onload_done) + return; + onload_done = true; + + run_hooks("onload"); +} + +function run_hooks(name) { + if (typeof(hooks) != "undefined") { + for (var i = 0; i < hooks.length; i++) { + if (hooks[i].name == name) { + hooks[i].call(); + } + } + } +} + +function hook(name, call) { + if (typeof(hooks) == "undefined") + hooks = new Array; + hooks.push({name: name, call: call}); +} + +function getElementsByClass(cls, node, tag) { + if (document.getElementsByClass) + return document.getElementsByClass(cls, node, tag); + if (! node) node = document; + if (! tag) tag = '*'; + var ret = new Array(); + var pattern = new RegExp("(^|\\s)"+cls+"(\\s|$)"); + var els = node.getElementsByTagName(tag); + for (i = 0; i < els.length; i++) { + if ( pattern.test(els[i].className) ) { + ret.push(els[i]); + } + } + return ret; +} diff --git a/underlays/javascript/ikiwiki/relativedate.js b/underlays/javascript/ikiwiki/relativedate.js new file mode 100644 index 000000000..5142332f1 --- /dev/null +++ b/underlays/javascript/ikiwiki/relativedate.js @@ -0,0 +1,76 @@ +// Causes html elements in the 'relativedate' class to be displayed +// as relative dates. The date is parsed from the title attribute, or from +// the element content. + +var dateElements; + +hook("onload", getDates); + +function getDates() { + dateElements = getElementsByClass('relativedate'); + for (var i = 0; i < dateElements.length; i++) { + var elt = dateElements[i]; + var title = elt.attributes.title; + var d = new Date(title ? title.value : elt.innerHTML); + if (! isNaN(d)) { + dateElements[i].date=d; + elt.title=elt.innerHTML; + } + } + + showDates(); +} + +function showDates() { + for (var i = 0; i < dateElements.length; i++) { + var elt = dateElements[i]; + var d = elt.date; + if (! isNaN(d)) { + elt.innerHTML=relativeDate(d); + } + } + setTimeout(showDates,30000); // keep updating every 30s +} + +var timeUnits = new Array; +timeUnits['minute'] = 60; +timeUnits['hour'] = timeUnits['minute'] * 60; +timeUnits['day'] = timeUnits['hour'] * 24; +timeUnits['month'] = timeUnits['day'] * 30; +timeUnits['year'] = timeUnits['day'] * 364; +var timeUnitOrder = ['year', 'month', 'day', 'hour', 'minute']; + +function relativeDate(date) { + var now = new Date(); + var offset = date.getTime() - now.getTime(); + var seconds = Math.round(Math.abs(offset) / 1000); + + // hack to avoid reading just in the future if there is a minor + // amount of clock slip + if (offset >= 0 && seconds < 30 * timeUnits['minute']) { + return "just now"; + } + + var ret = ""; + var shown = 0; + for (i = 0; i < timeUnitOrder.length; i++) { + var unit = timeUnitOrder[i]; + if (seconds >= timeUnits[unit]) { + var num = Math.floor(seconds / timeUnits[unit]); + seconds -= num * timeUnits[unit]; + if (ret) + ret += "and "; + ret += num + " " + unit + (num > 1 ? "s" : "") + " "; + + if (++shown == 2) + break; + } + else if (shown) + break; + } + + if (! ret) + ret = "less than a minute " + + return ret + (offset < 0 ? "ago" : "from now"); +} diff --git a/underlays/javascript/ikiwiki/toggle.js b/underlays/javascript/ikiwiki/toggle.js new file mode 100644 index 000000000..d190b737a --- /dev/null +++ b/underlays/javascript/ikiwiki/toggle.js @@ -0,0 +1,29 @@ +// Uses CSS to hide toggleables, to avoid any flashing on page load. The +// CSS is only emitted after it tests that it's going to be able +// to show the toggleables. +if (document.getElementById && document.getElementsByTagName && document.createTextNode) { + document.write(''); + hook("onload", inittoggle); +} + +function inittoggle() { + var as = getElementsByClass('toggle'); + for (var i = 0; i < as.length; i++) { + var id = as[i].href.match(/#(\w.+)/)[1]; + if (document.getElementById(id).className == "toggleable") + document.getElementById(id).style.display="none"; + as[i].onclick = function() { + toggle(this); + return false; + } + } +} + +function toggle(s) { + var id = s.href.match(/#(\w.+)/)[1]; + style = document.getElementById(id).style; + if (style.display == "none") + style.display = "block"; + else + style.display = "none"; +} diff --git a/underlays/javascript/relativedate.js b/underlays/javascript/relativedate.js deleted file mode 100644 index 5142332f1..000000000 --- a/underlays/javascript/relativedate.js +++ /dev/null @@ -1,76 +0,0 @@ -// Causes html elements in the 'relativedate' class to be displayed -// as relative dates. The date is parsed from the title attribute, or from -// the element content. - -var dateElements; - -hook("onload", getDates); - -function getDates() { - dateElements = getElementsByClass('relativedate'); - for (var i = 0; i < dateElements.length; i++) { - var elt = dateElements[i]; - var title = elt.attributes.title; - var d = new Date(title ? title.value : elt.innerHTML); - if (! isNaN(d)) { - dateElements[i].date=d; - elt.title=elt.innerHTML; - } - } - - showDates(); -} - -function showDates() { - for (var i = 0; i < dateElements.length; i++) { - var elt = dateElements[i]; - var d = elt.date; - if (! isNaN(d)) { - elt.innerHTML=relativeDate(d); - } - } - setTimeout(showDates,30000); // keep updating every 30s -} - -var timeUnits = new Array; -timeUnits['minute'] = 60; -timeUnits['hour'] = timeUnits['minute'] * 60; -timeUnits['day'] = timeUnits['hour'] * 24; -timeUnits['month'] = timeUnits['day'] * 30; -timeUnits['year'] = timeUnits['day'] * 364; -var timeUnitOrder = ['year', 'month', 'day', 'hour', 'minute']; - -function relativeDate(date) { - var now = new Date(); - var offset = date.getTime() - now.getTime(); - var seconds = Math.round(Math.abs(offset) / 1000); - - // hack to avoid reading just in the future if there is a minor - // amount of clock slip - if (offset >= 0 && seconds < 30 * timeUnits['minute']) { - return "just now"; - } - - var ret = ""; - var shown = 0; - for (i = 0; i < timeUnitOrder.length; i++) { - var unit = timeUnitOrder[i]; - if (seconds >= timeUnits[unit]) { - var num = Math.floor(seconds / timeUnits[unit]); - seconds -= num * timeUnits[unit]; - if (ret) - ret += "and "; - ret += num + " " + unit + (num > 1 ? "s" : "") + " "; - - if (++shown == 2) - break; - } - else if (shown) - break; - } - - if (! ret) - ret = "less than a minute " - - return ret + (offset < 0 ? "ago" : "from now"); -} diff --git a/underlays/javascript/toggle.js b/underlays/javascript/toggle.js deleted file mode 100644 index d190b737a..000000000 --- a/underlays/javascript/toggle.js +++ /dev/null @@ -1,29 +0,0 @@ -// Uses CSS to hide toggleables, to avoid any flashing on page load. The -// CSS is only emitted after it tests that it's going to be able -// to show the toggleables. -if (document.getElementById && document.getElementsByTagName && document.createTextNode) { - document.write(''); - hook("onload", inittoggle); -} - -function inittoggle() { - var as = getElementsByClass('toggle'); - for (var i = 0; i < as.length; i++) { - var id = as[i].href.match(/#(\w.+)/)[1]; - if (document.getElementById(id).className == "toggleable") - document.getElementById(id).style.display="none"; - as[i].onclick = function() { - toggle(this); - return false; - } - } -} - -function toggle(s) { - var id = s.href.match(/#(\w.+)/)[1]; - style = document.getElementById(id).style; - if (style.display == "none") - style.display = "block"; - else - style.display = "none"; -} -- cgit v1.2.3