r15878 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r15877‎ | r15878 | r15879 >
Date:11:40, 29 July 2006
Author:david
Status:old
Tags:
Comment:
oops, forgot to add this in the last commit
Modified paths:
  • /branches/liquidthreads/skins/common/lqt.js (added) (history)

Diff [purge]

Index: branches/liquidthreads/skins/common/lqt.js
@@ -0,0 +1,29 @@
 2+function lqt_on_load() {
 3+ // Expand a thread initially on request from query string:
 4+ var query_regexp = /.*[?&]lqt_expand=([^&]*).*/;
 5+ var query_val = query_regexp.exec(location.search);
 6+
 7+ if ( query_val.length == 2 ) {
 8+ var expand_id = 'lqt_thread_' + query_val[1];
 9+ var elem = (document.getElementById) ? document.getElementById(expand_id) :
 10+ ((document.all) ? document.all(expand_id) : null);
 11+ if(elem) {
 12+ elem.style.display = "block";
 13+ }
 14+ }
 15+
 16+}
 17+
 18+addOnloadHook(lqt_on_load);
 19+
 20+function lqt_hide_show(that_id) {
 21+ var elem = (document.getElementById) ? document.getElementById(that_id) :
 22+ ((document.all) ? document.all(that_id) : null);
 23+ if (elem) {
 24+ if ( elem.style.display == "none" ) {
 25+ elem.style.display = "block";
 26+ } else {
 27+ elem.style.display = "none";
 28+ }
 29+ }
 30+}