Created
May 14, 2016 22:21
-
-
Save ecasilla/0a70c16518aaed50a534bfa2bce750b0 to your computer and use it in GitHub Desktop.
Revisions
-
ecasilla created this gist
May 14, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ // eg https://github.com/cssnext/cssnext/labels // paste this script in your console // copy the output and now you can import it using https://github.com/ecasilla/github-labelmaker ! var labels = [].slice.call(document.querySelectorAll(".label-link")) .map(function(ele) { return { name: ele.textContent.trim(), color: ele.getAttribute("style") .replace("background-color:", "") .replace(/color:.*/,"") .trim() .replace(/^#/, "") .replace(/;$/, "") .trim(), } }); console.log(JSON.stringify(labels, null, 2));