User:Raphael1/monobook.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
The accompanying .css page for this skin is at User:Raphael1/monobook.css. |
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 <a onClick=\"collapseAllTables();\" href=\"#\">here</a> 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 <a onClick=\"expandAllTables();\" href=\"#\">here</a>.';
$( 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;
}