Skip to content

Instantly share code, notes, and snippets.

@superbrothers
Last active October 3, 2017 06:31
Show Gist options
  • Save superbrothers/f36d92061a8ba7681b0bda5a08abd478 to your computer and use it in GitHub Desktop.
Save superbrothers/f36d92061a8ba7681b0bda5a08abd478 to your computer and use it in GitHub Desktop.
Assign priority attendees on connpass
var ids = "ian,superbrothers"; // comma-separated list of connpass ids
ids.split(",").forEach(function (id) {
var href = "/user/" + id + "/";
var node = document.querySelector('td.name a[href="' + href + '"]');
if (node === null) {
console.error(id);
return;
};
node.closest("tr").querySelector("input").checked = true;
});
var list = [];
document.querySelectorAll(".presenter_list").forEach(function (n) {
var matches = (n.href || "").match(/\/user\/(\w+)/);
if (matches == null) {
return;
}
list.push(matches[1]);
})
console.log(list.join("\n"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment