I've written the following snippet so you can return and filter the Crowdcrafting tasks by site.
It currently returns up to 100 tasks (the maximum the API allows). It looks like a lot of sites have fewer affected posts than that, there's no instant way to get further posts for the ones that do though. It is possible to paginate results through the API (see the last note here), so maybe I'll look at adding that later.
I've included links to the SE post (both view and edit links) and the Crowdcrafting task page so that you can hit "Done" on the task, which should eventually get you more tasks (it takes 2 "Done"s to remove the post from the queue I believe).
Just pick a site, hit "Get Tasks" and work through the links...
function getget(url, callback) {
var xhr = new XMLHttpRequest();
xhr.addEventListener('load', function() {
var response = JSON.parse(xhr.responseText);
callback(response);
});
xhr.open('GET', url);
xhr.send();
}
function loadSites() {
var url = 'https://api.stackexchange.com/2.2/sites?pagesize=300&filter=!*L6Sij27hkbD7Gso';
getget(url, listSites);
}
function listSites(sites) {
var goBtn = document.getElementById('getTasks');
var sitesList = document.getElementById('sites');
for (var i = 0; i < sites.items.length; i++) {
var siteUrl = sites.items[i].site_url.replace(/^https?\:\/\//i, "");
var opt = document.createElement('option');
opt.value = siteUrl;
opt.textContent = sites.items[i].name;
sitesList.appendChild(opt);
}
goBtn.innerText = 'Get Tasks';
goBtn.disabled = false;
}
function listTasks(tasks, el) {
for (var i = 0; i < tasks.length; i++) {
var task = tasks[i],
info = task.info,
taskID = task.id,
// borked column headers again...
postID = info['PostId'] || info['12'] || info['149'] || info['73'] || '',
siteName = info.BaseHostAddress || info['meta.serverfault.com'] || info['askubuntu.com'] || info['sound.stackexchange.com'] || '';
lastID = taskID;
var span = document.createElement('span');
span.innerText = 'Post ' + postID + ':';
var seViewLink = document.createElement('a');
seViewLink.href = '//' + siteName + '/questions/' + postID;
seViewLink.innerText = 'View';
var seEditLink = document.createElement('a');
seEditLink.href = '//' + siteName + '/posts/' + postID + '/edit';
seEditLink.innerText = 'Edit';
var ccLink = document.createElement('a');
ccLink.className = 'ccLink';
ccLink.href = '//crowdcrafting.org/project/sehttpimagescleanup/task/' + taskID;
ccLink.innerText = 'Crowdcrafting Task ' + taskID;
var li = document.createElement('li');
li.appendChild(span);
li.appendChild(seViewLink);
li.appendChild(seEditLink);
li.appendChild(ccLink);
results.appendChild(li);
}
}
function init() {
var goBtn = document.getElementById('getTasks');
goBtn.addEventListener('click', function() {
var results = document.getElementById('results');
results.innerHTML = '';
var site = document.getElementById('sites').value;
var searchUrl = '//crowdcrafting.org/api/task?project_id=4667&limit=100&info=BaseHostAddress::' + site;
getget(searchUrl, listTasks, results);
// task columns are borked... let's run this a few times
var searchUrl = '//crowdcrafting.org/api/task?project_id=4667&limit=100&info=meta.serverfault.com::' + site;
getget(searchUrl, listTasks, results);
var searchUrl = '//crowdcrafting.org/api/task?project_id=4667&limit=100&info=askubuntu.com::' + site;
getget(searchUrl, listTasks, results);
var searchUrl = '//crowdcrafting.org/api/task?project_id=4667&limit=100&info=sound.stackexchange.com::' + site;
getget(searchUrl, listTasks, results);
});
loadSites();
}
// go!
init();
ul { list-style: none; margin: 1em 0; padding: 0; }
li { margin: 0; padding: .5em 0; }
span { display: inline-block; width: 6em; }
a { color: #fff; background-color: #03A7DD; border-radius: 4px; padding: .25em .5em; margin: 0 .5em 0 0; text-decoration: none; }
a.ccLink { background-color: #2B9884; }
<label>Site: <select id="sites"></select></label>
<button id="getTasks" disabled>Loading Sites...</button>
<ul id="results"></ul>
Note, links in Stack Snippets don't really work... just open them in a new tab (ctrl+click, middle-click, right-click+"Open in New Tab" or whatever)