Last active
October 3, 2017 06:31
-
-
Save superbrothers/f36d92061a8ba7681b0bda5a08abd478 to your computer and use it in GitHub Desktop.
Assign priority attendees on connpass
This file contains hidden or 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 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; | |
}); |
This file contains hidden or 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 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