Gebruiker:Aspiringshortlot/Zeusmode/preferences.js
Naar navigatie springen
Naar zoeken springen
Let op! Nadat je de veranderingen hebt opgeslagen, moet je de cache van je browser nog legen om ze daadwerkelijk te zien.
Mozilla (incl. Firefox) | ctrl-shift-r |
IE | ctrl-f5 |
Opera | f5 |
Safari | cmd-r |
Konqueror | f5 |
//<pre><nowiki>
//--------------------------------------------------------
// Manage preferences for [[User:Zanaq/Zeusmode]]
// (c) Zanaq, 2008, released under GPL
//--------------------------------------------------------
function loadPrefs()
{
content=document.getElementById('bodyContent');
content.innerHTML='';
if (( typeof ( zmver ) == "undefined" ) || (zmver < zmVersion) )
{
zmver='0';
/*
if ( typeof ( zmUseQuickTemplate ) == "undefined" ) zmUseQuickTemplate=true;
if ( typeof ( zmUseLocalTemplates ) == "undefined" ) zmUseLocalTemplates=true;
if ( typeof ( zmUseCustomTemplates ) == "undefined" ) zmUseCustomTemplates=false;
if ( typeof ( zmCustomTemplateLocation ) == "undefined" ) zmCustomTemplateLocation = 'http://nl.wikipedia.org/wiki/Gebruiker:Zanaq/zeusmodetemplates.js';
if ( typeof ( zmUseRevert ) == "undefined" ) zmUseRevert=true;
if ( typeof ( zmUsePlace ) == "undefined" ) zmUsePlace = true;
if ( typeof ( zmUseUndo ) == "undefined" ) zmUseUndo = true;
if ( typeof ( zmUseRollback ) == "undefined" ) zmUseRollback = (isSysop == true) ? false : true;
if ( typeof ( zmUseWatchlist ) == "undefined" ) zmUseWatchlist=true;
if ( typeof ( zmUseSinceLinks ) == "undefined" ) zmUseSinceLinks=true;
if ( typeof ( zmUseSinceTab ) == "undefined" ) zmUseSinceTab=true;
if ( typeof ( zmUseLastTab ) == "undefined" ) zmUseLastTab=true;
if ( typeof ( zmUseNewPages ) == "undefined" ) zmUseNewPages=true;
if ( typeof ( zmUseMarkPatrolled ) == "undefined" ) zmUseMarkPatrolled=true;
if ( typeof ( zmUseMisc ) == "undefined" ) zmUseMisc=true;
if ( typeof ( zmUseBlockRequest ) == "undefined" ) zmUseBlockRequest = (isSysop == true) ? false : true;
if ( typeof ( zmRecentChangesLink ) == "undefined" ) zmRecentChangesLink=true;
if ( typeof ( zmzmRecentChangesDefault ) == "undefined" ) zmRecentChangesDefault='?hidepatrolled=1&hideliu=1&limit=500';
*/
content.innerHTML+=txtNewVersion + '<br>';
}
/*
if
{
content.innerHTML+=txtNewVersion + '<br>';
//document.location.href="/wiki/Zeusmode:Preferences";
}
*/
a='<form>';
a+='<div class=toccolours style="margin-top:2em;padding-left:2em">';
a+='<table>';
a+='<tr><td><input type="checkbox" id="chkQF" name="chkQF" onclick=""' + ((zmUseQuickTemplate) ? ' CHECKED ' : '') + '> ' + txtQFunction + ' <a href="/wiki/User:Zanaq/Zeusmode/quickTemplate">(?)</a></td></tr>';
a+='<tr><td> <input type="checkbox" id="chkLocalTemplatesF" name="chkLocalTemplatesF" onclick="" ' + ((zmUseLocalTemplates ) ? ' CHECKED ' : '') + '> ' + txtLocalTemplates + ' <a href="/wiki/User:Zanaq/Zeusmode/LocalTemplates">(?)</a></td></tr>';
ctCombobox=createComboBox('inputCTL', 320, zmCustomTemplateLocation, txtCTOptions, txtCTOptions);
a+='<tr><td> <input type="checkbox" id="chkCustomTemplatesF" name="chkRecentF" onclick="" ' + ((zmUseCustomTemplates ) ? ' CHECKED ' : '') + '> ' + txtCustomTemplates + ' ' + ctCombobox + ' <a href="/wiki/User:Zanaq/Zeusmode/CustomTemplates">(?)</a></td></tr>';
a+='<tr><td><input type="checkbox" id="chkRF" name="chkRF" onclick=""' + ((zmUseRevert) ? ' CHECKED ' : '') + '> ' + txtRFunction + ' <a href="/wiki/User:Zanaq/Zeusmode/Revert">(?)</a></td></tr>';
a+='<tr><td> <input type="checkbox" id="chkPlaceF" name="chkPlaceF" onclick=""' + ((zmUsePlace) ? ' CHECKED ' : '') + '> ' + txtPlaceFunction + ' <a href="/wiki/User:Zanaq/Zeusmode/Place">(?)</a></td></tr>';
a+='<tr><td> <input type="checkbox" id="chkRollbackF" name="chkRollbackF" onclick=""' + ((zmUseRollback) ? ' CHECKED ' : '') + '> ' + txtRollbackFunction + ' <a href="/wiki/User:Zanaq/Zeusmode/Rollback">(?)</a></td></tr>';
a+='<tr><td> <input type="checkbox" id="chkUndoF" name="chkUndoF" onclick=""' + ((zmUseUndo) ? ' CHECKED ' : '') + '> ' + txtUndoFunction + ' <a href="/wiki/User:Zanaq/Zeusmode/Undo">(?)</a></td></tr>';
a+='<tr><td><input type="checkbox" id="chkNF" name="chkNF" onclick=""' + ((zmUseNewPages) ? ' CHECKED ' : '') + '> ' + txtNFunction + ' <a href="/wiki/User:Zanaq/Zeusmode/Newpages">(?)</a></td></tr>';
a+='<tr><td> <input type="checkbox" id="chkMarkPatrolledF" name="chkRollback" onclick=""' + ((zmUseMarkPatrolled) ? ' CHECKED ' : '') + '> ' + txtMarkPatrolledFunction + ' <a href="/wiki/User:Zanaq/Zeusmode/MarkPatrolled">(?)</a></td></tr>';
a+='<tr><td><input type="checkbox" id="chkWF" name="chkWF" onclick=""' + ((zmUseWatchlist) ? ' CHECKED ' : '') + '> ' + txtWFunction + ' <a href="/wiki/User:Zanaq/Zeusmode/Watchlist">(?)</a></td></tr>';
a+='<tr><td> <input type="checkbox" id="chkSinceLinksF" name="chkSinceLinksF" onclick=""' + ((zmUseSinceLinks) ? ' CHECKED ' : '') + '> ' + txtSinceLinksFunction + ' <a href="/wiki/User:Zanaq/Zeusmode/SinceLinks">(?)</a></td></tr>';
a+='<tr><td> <input type="checkbox" id="chkSinceTabF" name="chkSinceTabF" onclick=""' + ((zmUseSinceTab) ? ' CHECKED ' : '') + '> ' + txtSinceTabFunction + ' <a href="/wiki/User:Zanaq/Zeusmode/SinceTab">(?)</a></td></tr>';
a+='<tr><td> <input type="checkbox" id="chkLastTabF" name="chkLastTabF" onclick=""' + ((zmUseLastTab) ? ' CHECKED ' : '') + '> ' + txtLastTabFunction + ' <a href="/wiki/User:Zanaq/Zeusmode/LastTab">(?)</a></td></tr>';
a+='<tr><td><input type="checkbox" id="chkMF" name="chkMF" onclick=""' + ((zmUseMisc) ? ' CHECKED ' : '') + '> ' + txtMFunction + ' <a href="/wiki/User:Zanaq/Zeusmode/Misc">(?)</a></td></tr>';
a+='<tr><td> <input type="checkbox" id="chkBlockReqF" name="chkBlockReqF" onclick=""' + ((zmUseBlockRequest) ? ' CHECKED ' : '') + '> ' + txtBlockReqFunction + ' <a href="/wiki/User:Zanaq/Zeusmode/BlockRequest">(?)</a></td></tr>';
//a+='<tr><td> <input type="checkbox" id="chkRecentF" name="chkRecentF" onclick=""' + ((zmRecentChangesLink) ? ' CHECKED ' : '') + '> ' + txtRecentFunction + '<input type="text" id="inputRCD" name="inputRCD" size="40" value='+zmRecentChangesDefault+'> <a href="/wiki/User:Zanaq/Zeusmode/RecentChangesLink">(?)</a></td></tr>';
rcCombobox=createComboBox('inputRCD', 320, zmRecentChangesDefault, txtRCOptions, txtRCOptionCaptions);
a+='<tr><td> <input type="checkbox" id="chkRecentF" name="chkRecentF" onclick="" ' + ((zmRecentChangesLink) ? ' CHECKED ' : '') + '> ' + txtRecentFunction + ' ' + rcCombobox + ' <a href="/wiki/User:Zanaq/Zeusmode/RecentChangesLink">(?)</a></td></tr>';
a+='<tr><td> <input type="checkbox" id="chkUserListLinks" name="chkUserListLinks" onclick=""' + ((zmUseUserListLinks) ? ' CHECKED ' : '') + '> ' + txtUserListLinks + ' <a href="/wiki/User:Zanaq/Zeusmode/UserListLinks">(?)</a></td></tr>';
//a+='<input style="position:relative;top:0px;left:0px;width:150px;z-index:5" id="txtCombo" class="txtBox"/><br><select style="position: relative;top:-22px;left:0px;width:172px;border:0" onChange="JavaScript:changeSelect(this, \'txtCombo\');" id="selCombo" class="dropDown"/> <option value="Volvo"/>Volvo <option value="Saab"/>Saab bkofpdkf kopf kgpokg regrko kfdpog kdfpog fd <option value="Fiat"/>Fiat <option value="Audi"/>Audi </select>';
/* zmUseDeletionNomination=true;
zmUseSinceLinks=true;
zmUseSinceTab=true;
zmUseLastTab=true;
zmUseNewPages=true;
zmUseMisc=true;
zmUseBlockRequest = (isSysop == true) ? false : true;
zmRecentChangesLink=true;
*/
a+='</table>';
a+='</div>';
a+='<div class=toccolours style="margin-top:2em;padding-left:2em">';
a+='<table>';
a+='<tr><td><input type="checkbox" id="chkIsSysop" name="chkIsSysop" onclick=""' + ((isSysop) ? ' CHECKED ' : '') + '>' + txtIsSysop + ' <a href="/wiki/User:Zanaq/quickWikify">(?)</a></td></tr>'
a+='</table>';
a+='</div>';
a+='<div class=toccolours style="margin-top:2em;padding-left:2em">';
a+='<a href=javascript:zmSaveChanges()><span style=font-size:200%>' + txtSavePage + '</span></a> ' + txtRefresh;
a+='</div>';
a+='</form>';
content.innerHTML+=a;
}
if (document.location.href.indexOf('Zeusmode:Preferences') != -1)
{
zmLoadMonobook()
window.addEventListener("DOMContentLoaded", loadPrefs, false);
}
else if (( typeof ( zmver ) == "undefined" ) || (zmver < zmVersion) )
{
window.addEventListener("DOMContentLoaded", versionAlert, false);
}
function versionAlert()
{
document.getElementById('contentSub').innerHTML+=txtNewVerAlert;
}
function zmLoadMonobook()
{
document.write('<div id=hiddenMonobook style=display:none></div>')
//alert(pageTitle);
xmlhttp = HTTPClient();
if (!xmlhttp)
return;
var thetitle="/w/index.php?title="+encodeURIComponent('Special:MyPage/' + skin + '.js');
//alert(thetitle + '&action=edit');
xmlhttp.open("GET", thetitle + '&action=edit', true);
xmlhttp.onreadystatechange = loadEditForm2;
xmlhttp.send(null);
}
function loadEditForm2()
{
if (xmlhttp.readyState != 4)
return;
a=xmlhttp.responseText.indexOf('<form id="editform"');
b=xmlhttp.responseText.indexOf('</form>',a+1)+7;
document.getElementById('hiddenMonobook').innerHTML = xmlhttp.responseText.substring(a,b);
akeytt();
}
function zmSaveChanges()
{
//alert(document.getElementById('wpTextbox1').value);
a='\/\/ ZeusMode 2.beta - SETTINGS - [[Image:Zeus_head_thumb-zanaq.png]]\n';
a+=' zmver=' + zmVersion + ';\n';
a+=' isSysop=' + document.getElementById('chkIsSysop').checked + ';\n';
a+=' zmUseQuickTemplate=' + document.getElementById('chkQF').checked + ';\n';
zmUseLocalTemplates
a+=' zmUseLocalTemplates=' + document.getElementById('chkLocalTemplatesF').checked + ';\n';
a+=' zmUseCustomTemplates=' + document.getElementById('chkCustomTemplatesF').checked + ';\n';
a+=' zmCustomTemplateLocation="' + document.getElementById('inputCTL').value + '";\n';
a+=' zmUseRevert=' + document.getElementById('chkRF').checked + ';\n';
a+=' zmUsePlace=' + document.getElementById('chkPlaceF').checked + ';\n';
a+=' zmUseUndo=' + document.getElementById('chkUndoF').checked + ';\n';
a+=' zmUseRollback=' + document.getElementById('chkRollbackF').checked + ';\n';
a+=' zmUseWatchlist=' + document.getElementById('chkWF').checked + ';\n';
a+=' zmUseSinceLinks=' + document.getElementById('chkSinceLinksF').checked + ';\n';
a+=' zmUseSinceTab=' + document.getElementById('chkSinceTabF').checked + ';\n';
a+=' zmUseLastTab=' + document.getElementById('chkLastTabF').checked + ';\n';
a+=' zmUseNewPages=' + document.getElementById('chkNF').checked + ';\n';
a+=' zmUseMarkPatrolled=' + document.getElementById('chkMarkPatrolledF').checked + ';\n';
a+=' zmUseMisc=' + document.getElementById('chkMF').checked + ';\n';
a+=' zmUseBlockRequest=' + document.getElementById('chkBlockReqF').checked + ';\n';
a+=' zmRecentChangesLink=' + document.getElementById('chkRecentF').checked + ';\n';
a+=' zmRecentChangesDefault="' + document.getElementById('inputRCD').value + '";\n';
a+=' zmUseUserListLinks=' + document.getElementById('chkUserListLinks').checked + ';\n';
a+='\/\/ --- END OF ZEUSMODE SETTINGS\n';
//alert(a);
s=document.getElementById('wpTextbox1').value.indexOf('\/\/ ZeusMode 2.beta - SETTINGS');
if (s==-1)
{
document.getElementById('wpTextbox1').value += a;
} else {
ss=document.getElementById('wpTextbox1').value.indexOf('\/\/ --- END OF ZEUSMODE SETTINGS') +32;
document.getElementById('wpTextbox1').value=document.getElementById('wpTextbox1').value.substring(0,s) + a + document.getElementById('wpTextbox1').value.substring(ss);
}
document.getElementById('wpSummary').value=settingsSummary;
//alert(document.getElementById('wpTextbox1').value);
document.editform.submit();
}
//</nowiki></pre>