Skip to content

Instantly share code, notes, and snippets.

@chrisadipascual
Last active March 26, 2018 10:59
Show Gist options
  • Save chrisadipascual/240f8e7bb03617ad0ff9eefbb801de83 to your computer and use it in GitHub Desktop.
Save chrisadipascual/240f8e7bb03617ad0ff9eefbb801de83 to your computer and use it in GitHub Desktop.
javascript to parse the font awesome icon names from the font awesome cheatsheet
var xmlString= "";
$(".col-md-4.col-sm-6.col-lg-3").each(function (i, element) {
var name = null;
var value = null;
//3=FA Class Name 5=Unicode
var icon = $(element).text().split("\n")[3].trim();
//var icon = $(element).text().split("\n")[5].trim();
//name = icon.replace("fa-", "").replace(/-/g, "_");
value = icon;
xmlString += '\n' + (icon);
});
console.log(xmlString);
@chrisadipascual
Copy link
Author

@chrisadipascual
Copy link
Author

How to use :

Open the fontawesome cheat sheet url in chrome http://fontawesome.io/cheatsheet/
Open developer tools (F12) , run the script on console tab.
All credits to the original developer of the extraction script (keannan5390)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment