Skip to content

Instantly share code, notes, and snippets.

@macbre
Created February 11, 2014 11:10
Show Gist options
  • Save macbre/8933000 to your computer and use it in GitHub Desktop.
Save macbre/8933000 to your computer and use it in GitHub Desktop.
unblockUploads.js
var cities =[879,1491];
// wgUploadMaintenance = false
cities.forEach(
function(cityId) {
$.post('/wiki/Special:WikiFactory?action=select', {
action:'ajax',
rs: 'axWFactoryRemoveVariable',
cityid: cityId,
varCityid: cityId,
varType:'boolean',
varName:'wgUploadMaintenance',
varId:1335,
varValue:0
}).then(function() {
console.log(cityId + ': wgUploadMaintenance removed');
});
}
);
// wgEnableUploads = true
cities.forEach(
function(cityId) {
$.post('/wiki/Special:WikiFactory?action=select', {
action:'ajax',
rs: 'axWFactoryRemoveVariable',
cityid: cityId,
varCityid: cityId,
varType:'boolean',
varName:'wgEnableUploads',
varId:214,
varValue:1
}).then(function() {
console.log(cityId + ': wgEnableUploads removed');
});
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment