User:Dominic/monobook.js
Jump to navigation
Jump to search
Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
The accompanying .css page for this skin can be added at User:Dominic/monobook.css. |
function uploadbatch() {
if((document.title.indexOf('Upload file - ') == 0)&&(queryString('wpUploadFile'))) {
try { netscape.security.PrivilegeManager.enablePrivilege('UniversalFileRead'); }
catch($err) {
var $privileges = false;
alert('Error: Unable to perform file upload. App was denied elevated privileges to do so.');
return;
}
if((queryString('wpUploadFile'))&&(document.getElementById('wpUploadFile').value == '')) document.getElementById('wpUploadFile').value = decodeURIComponent(queryString('wpUploadFile')).replace(/\+/g,' ')
if((queryString('wpDestFile'))&&(document.getElementById('wpDestFile').value == '')) document.getElementById('wpDestFile').value = decodeURIComponent(queryString('wpDestFile')).replace(/\+/g,' ')
if((queryString('wpUploadDescription'))&&(document.getElementById('wpUploadDescription').value == '')) document.getElementById('wpUploadDescription').value = decodeURIComponent(queryString('wpUploadDescription')).replace(/\+/g,' ')
if(queryString('wpUpload') == 'submit') document.forms[0].wpUpload.click()
}
}
addOnloadHook(uploadbatch);
function queryString(p) {
var re = RegExp('[&?]' + p + '=([^&]*)');
var matches;
if (matches = re.exec(document.location)) {
try {
return decodeURI(matches[1]);
} catch (e) {
}
}
return null;
}