Index: trunk/phase3/skins/common/wikibits.js |
— | — | @@ -146,7 +146,7 @@ |
147 | 147 | toggleLink.id = 'togglelink'; |
148 | 148 | toggleLink.className = 'internal'; |
149 | 149 | toggleLink.href = '#'; |
150 | | - toggleLink.onclick = toggleToc; |
| 150 | + addClickHandler( toggleLink, function( evt ) { toggleToc(); return killEvt( evt ); } ); |
151 | 151 | |
152 | 152 | toggleLink.appendChild( document.createTextNode( tocHideText ) ); |
153 | 153 | |
— | — | @@ -173,6 +173,17 @@ |
174 | 174 | } |
175 | 175 | } |
176 | 176 | |
| 177 | +function killEvt( evt ) { |
| 178 | + evt = evt || window.event || window.Event; // W3C, IE, Netscape |
| 179 | + if ( typeof ( evt.preventDefault ) != 'undefined' ) { |
| 180 | + evt.preventDefault(); // Don't follow the link |
| 181 | + evt.stopPropagation(); |
| 182 | + } else { |
| 183 | + evt.cancelBubble = true; // IE |
| 184 | + } |
| 185 | + return false; // Don't follow the link (IE) |
| 186 | +} |
| 187 | + |
177 | 188 | function toggleToc() { |
178 | 189 | var tocmain = document.getElementById( 'toc' ); |
179 | 190 | var toc = document.getElementById('toc').getElementsByTagName('ul')[0]; |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1537,7 +1537,7 @@ |
1538 | 1538 | * to ensure that client-side caches do not keep obsolete copies of global |
1539 | 1539 | * styles. |
1540 | 1540 | */ |
1541 | | -$wgStyleVersion = '289'; |
| 1541 | +$wgStyleVersion = '290'; |
1542 | 1542 | |
1543 | 1543 | /** |
1544 | 1544 | * This will cache static pages for non-logged-in users to reduce |