Skip to content

Instantly share code, notes, and snippets.

Forked from MoOx/index.js
Last active Oct 17, 2016
What would you like to do?
Export GitHub labels
// go on you labels pages and paste this script in your console
var labels = [];
.forEach(function(element) {
name: element.textContent.trim(),
// using style.backgroundColor might returns "rgb(...)"
bgcolor: element.getAttribute("style")
.replace("background-color:", "")
.replace(/;$/, ""),
color: element.getAttribute("style")
.replace(/;$/, ""),
console.log(JSON.stringify(labels, null, 2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment