User:Raphael1/monobook.js

var collapseCaption = "hide"; var expandCaption = "show";

var hide_offer = 'Even though Wikipedia is not censored, we do respect the religious sentiments of our readers. When you click here all depictions of Muhammad will be hidden on this page.'; var show_offer = 'Currently all depictions of Muhammad on this page are hidden. You can make them all at once visible again by clicking here.';

$( function { var ambox_text = document.getElementById('ambox_text');  if (ambox_text) ambox_text.innerHTML = hide_offer; });

function collapseAllTables { for (var tableIndex=0; tableIndex < 50; tableIndex++) { var Table = document.getElementById("collapsibleTable" + tableIndex); var Button = document.getElementById( "collapseButton" + tableIndex ); if ( Table && Button && ( Button.firstChild.data == collapseCaption )) collapseTable(tableIndex); } document.getElementById('ambox_text').innerHTML = show_offer; }

function expandAllTables { for (var tableIndex=0; tableIndex < 50; tableIndex++) { var Table = document.getElementById("collapsibleTable" + tableIndex); var Button = document.getElementById( "collapseButton" + tableIndex ); if ( Table && Button && ( Button.firstChild.data == expandCaption )) collapseTable(tableIndex); } document.getElementById('ambox_text').innerHTML = hide_offer; }