Created
February 11, 2014 11:10
-
-
Save macbre/8933000 to your computer and use it in GitHub Desktop.
unblockUploads.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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