Skip to content

Instantly share code, notes, and snippets.

@hokaccha
Created September 18, 2013 08:36
Show Gist options
  • Save hokaccha/6606322 to your computer and use it in GitHub Desktop.
Save hokaccha/6606322 to your computer and use it in GitHub Desktop.
イラレで選択したFont Awesomeの文字のクラス名を表示するスクリプト
(function() {
// Font Awesome version: 3.2.1
// map from: http://fortawesome.github.io/Font-Awesome/cheatsheet/
// You can copy for map string using this script at console.
//
// var result = {};
// $('.row .span4').each(function() {
// var $row = $(this);
// var code = ($row.find('.muted').text().match(/&#x(\w+);/) || [])[1];
// var className = ($row.text().match(/(icon-[\w-]+)/) || [])[1];
// if (code && className) result[code] = className;
// });
// copy(JSON.stringify(result, null, 2));
//
var map = {
'f000': 'icon-glass',
'f001': 'icon-music',
'f002': 'icon-search',
'f003': 'icon-envelope-alt',
'f004': 'icon-heart',
'f005': 'icon-star',
'f006': 'icon-star-empty',
'f007': 'icon-user',
'f008': 'icon-film',
'f009': 'icon-th-large',
'f00a': 'icon-th',
'f00b': 'icon-th-list',
'f00c': 'icon-ok',
'f00d': 'icon-remove',
'f00e': 'icon-zoom-in',
'f010': 'icon-zoom-out',
'f011': 'icon-off',
'f012': 'icon-signal',
'f013': 'icon-cog',
'f014': 'icon-trash',
'f015': 'icon-home',
'f016': 'icon-file-alt',
'f017': 'icon-time',
'f018': 'icon-road',
'f019': 'icon-download-alt',
'f01a': 'icon-download',
'f01b': 'icon-upload',
'f01c': 'icon-inbox',
'f01d': 'icon-play-circle',
'f01e': 'icon-repeat',
'f021': 'icon-refresh',
'f022': 'icon-list-alt',
'f023': 'icon-lock',
'f024': 'icon-flag',
'f025': 'icon-headphones',
'f026': 'icon-volume-off',
'f027': 'icon-volume-down',
'f028': 'icon-volume-up',
'f029': 'icon-qrcode',
'f02a': 'icon-barcode',
'f02b': 'icon-tag',
'f02c': 'icon-tags',
'f02d': 'icon-book',
'f02e': 'icon-bookmark',
'f02f': 'icon-print',
'f030': 'icon-camera',
'f031': 'icon-font',
'f032': 'icon-bold',
'f033': 'icon-italic',
'f034': 'icon-text-height',
'f035': 'icon-text-width',
'f036': 'icon-align-left',
'f037': 'icon-align-center',
'f038': 'icon-align-right',
'f039': 'icon-align-justify',
'f03a': 'icon-list',
'f03b': 'icon-indent-left',
'f03c': 'icon-indent-right',
'f03d': 'icon-facetime-video',
'f03e': 'icon-picture',
'f040': 'icon-pencil',
'f041': 'icon-map-marker',
'f042': 'icon-adjust',
'f043': 'icon-tint',
'f044': 'icon-edit',
'f045': 'icon-share',
'f046': 'icon-check',
'f047': 'icon-move',
'f048': 'icon-step-backward',
'f049': 'icon-fast-backward',
'f04a': 'icon-backward',
'f04b': 'icon-play',
'f04c': 'icon-pause',
'f04d': 'icon-stop',
'f04e': 'icon-forward',
'f050': 'icon-fast-forward',
'f051': 'icon-step-forward',
'f052': 'icon-eject',
'f053': 'icon-chevron-left',
'f054': 'icon-chevron-right',
'f055': 'icon-plus-sign',
'f056': 'icon-minus-sign',
'f057': 'icon-remove-sign',
'f058': 'icon-ok-sign',
'f059': 'icon-question-sign',
'f05a': 'icon-info-sign',
'f05b': 'icon-screenshot',
'f05c': 'icon-remove-circle',
'f05d': 'icon-ok-circle',
'f05e': 'icon-ban-circle',
'f060': 'icon-arrow-left',
'f061': 'icon-arrow-right',
'f062': 'icon-arrow-up',
'f063': 'icon-arrow-down',
'f064': 'icon-share-alt',
'f065': 'icon-resize-full',
'f066': 'icon-resize-small',
'f067': 'icon-plus',
'f068': 'icon-minus',
'f069': 'icon-asterisk',
'f06a': 'icon-exclamation-sign',
'f06b': 'icon-gift',
'f06c': 'icon-leaf',
'f06d': 'icon-fire',
'f06e': 'icon-eye-open',
'f070': 'icon-eye-close',
'f071': 'icon-warning-sign',
'f072': 'icon-plane',
'f073': 'icon-calendar',
'f074': 'icon-random',
'f075': 'icon-comment',
'f076': 'icon-magnet',
'f077': 'icon-chevron-up',
'f078': 'icon-chevron-down',
'f079': 'icon-retweet',
'f07a': 'icon-shopping-cart',
'f07b': 'icon-folder-close',
'f07c': 'icon-folder-open',
'f07d': 'icon-resize-vertical',
'f07e': 'icon-resize-horizontal',
'f080': 'icon-bar-chart',
'f081': 'icon-twitter-sign',
'f082': 'icon-facebook-sign',
'f083': 'icon-camera-retro',
'f084': 'icon-key',
'f085': 'icon-cogs',
'f086': 'icon-comments',
'f087': 'icon-thumbs-up-alt',
'f088': 'icon-thumbs-down-alt',
'f089': 'icon-star-half',
'f08a': 'icon-heart-empty',
'f08b': 'icon-signout',
'f08c': 'icon-linkedin-sign',
'f08d': 'icon-pushpin',
'f08e': 'icon-external-link',
'f090': 'icon-signin',
'f091': 'icon-trophy',
'f092': 'icon-github-sign',
'f093': 'icon-upload-alt',
'f094': 'icon-lemon',
'f095': 'icon-phone',
'f096': 'icon-check-empty',
'f097': 'icon-bookmark-empty',
'f098': 'icon-phone-sign',
'f099': 'icon-twitter',
'f09a': 'icon-facebook',
'f09b': 'icon-github',
'f09c': 'icon-unlock',
'f09d': 'icon-credit-card',
'f09e': 'icon-rss',
'f0a0': 'icon-hdd',
'f0a1': 'icon-bullhorn',
'f0a2': 'icon-bell',
'f0a3': 'icon-certificate',
'f0a4': 'icon-hand-right',
'f0a5': 'icon-hand-left',
'f0a6': 'icon-hand-up',
'f0a7': 'icon-hand-down',
'f0a8': 'icon-circle-arrow-left',
'f0a9': 'icon-circle-arrow-right',
'f0aa': 'icon-circle-arrow-up',
'f0ab': 'icon-circle-arrow-down',
'f0ac': 'icon-globe',
'f0ad': 'icon-wrench',
'f0ae': 'icon-tasks',
'f0b0': 'icon-filter',
'f0b1': 'icon-briefcase',
'f0b2': 'icon-fullscreen',
'f0c0': 'icon-group',
'f0c1': 'icon-link',
'f0c2': 'icon-cloud',
'f0c3': 'icon-beaker',
'f0c4': 'icon-cut',
'f0c5': 'icon-copy',
'f0c6': 'icon-paper-clip',
'f0c7': 'icon-save',
'f0c8': 'icon-sign-blank',
'f0c9': 'icon-reorder',
'f0ca': 'icon-list-ul',
'f0cb': 'icon-list-ol',
'f0cc': 'icon-strikethrough',
'f0cd': 'icon-underline',
'f0ce': 'icon-table',
'f0d0': 'icon-magic',
'f0d1': 'icon-truck',
'f0d2': 'icon-pinterest',
'f0d3': 'icon-pinterest-sign',
'f0d4': 'icon-google-plus-sign',
'f0d5': 'icon-google-plus',
'f0d6': 'icon-money',
'f0d7': 'icon-caret-down',
'f0d8': 'icon-caret-up',
'f0d9': 'icon-caret-left',
'f0da': 'icon-caret-right',
'f0db': 'icon-columns',
'f0dc': 'icon-sort',
'f0dd': 'icon-sort-down',
'f0de': 'icon-sort-up',
'f0e0': 'icon-envelope',
'f0e1': 'icon-linkedin',
'f0e2': 'icon-undo',
'f0e3': 'icon-legal',
'f0e4': 'icon-dashboard',
'f0e5': 'icon-comment-alt',
'f0e6': 'icon-comments-alt',
'f0e7': 'icon-bolt',
'f0e8': 'icon-sitemap',
'f0e9': 'icon-umbrella',
'f0ea': 'icon-paste',
'f0eb': 'icon-lightbulb',
'f0ec': 'icon-exchange',
'f0ed': 'icon-cloud-download',
'f0ee': 'icon-cloud-upload',
'f0f0': 'icon-user-md',
'f0f1': 'icon-stethoscope',
'f0f2': 'icon-suitcase',
'f0f3': 'icon-bell-alt',
'f0f4': 'icon-coffee',
'f0f5': 'icon-food',
'f0f6': 'icon-file-text-alt',
'f0f7': 'icon-building',
'f0f8': 'icon-hospital',
'f0f9': 'icon-ambulance',
'f0fa': 'icon-medkit',
'f0fb': 'icon-fighter-jet',
'f0fc': 'icon-beer',
'f0fd': 'icon-h-sign',
'f0fe': 'icon-plus-sign-alt',
'f100': 'icon-double-angle-left',
'f101': 'icon-double-angle-right',
'f102': 'icon-double-angle-up',
'f103': 'icon-double-angle-down',
'f104': 'icon-angle-left',
'f105': 'icon-angle-right',
'f106': 'icon-angle-up',
'f107': 'icon-angle-down',
'f108': 'icon-desktop',
'f109': 'icon-laptop',
'f10a': 'icon-tablet',
'f10b': 'icon-mobile-phone',
'f10c': 'icon-circle-blank',
'f10d': 'icon-quote-left',
'f10e': 'icon-quote-right',
'f110': 'icon-spinner',
'f111': 'icon-circle',
'f112': 'icon-reply',
'f113': 'icon-github-alt',
'f114': 'icon-folder-close-alt',
'f115': 'icon-folder-open-alt',
'f116': 'icon-expand-alt',
'f117': 'icon-collapse-alt',
'f118': 'icon-smile',
'f119': 'icon-frown',
'f11a': 'icon-meh',
'f11b': 'icon-gamepad',
'f11c': 'icon-keyboard',
'f11d': 'icon-flag-alt',
'f11e': 'icon-flag-checkered',
'f120': 'icon-terminal',
'f121': 'icon-code',
'f122': 'icon-reply-all',
'f123': 'icon-star-half-empty',
'f124': 'icon-location-arrow',
'f125': 'icon-crop',
'f126': 'icon-code-fork',
'f127': 'icon-unlink',
'f128': 'icon-question',
'f129': 'icon-info',
'f12a': 'icon-exclamation',
'f12b': 'icon-superscript',
'f12c': 'icon-subscript',
'f12d': 'icon-eraser',
'f12e': 'icon-puzzle-piece',
'f130': 'icon-microphone',
'f131': 'icon-microphone-off',
'f132': 'icon-shield',
'f133': 'icon-calendar-empty',
'f134': 'icon-fire-extinguisher',
'f135': 'icon-rocket',
'f136': 'icon-maxcdn',
'f137': 'icon-chevron-sign-left',
'f138': 'icon-chevron-sign-right',
'f139': 'icon-chevron-sign-up',
'f13a': 'icon-chevron-sign-down',
'f13b': 'icon-html5',
'f13c': 'icon-css3',
'f13d': 'icon-anchor',
'f13e': 'icon-unlock-alt',
'f140': 'icon-bullseye',
'f141': 'icon-ellipsis-horizontal',
'f142': 'icon-ellipsis-vertical',
'f143': 'icon-rss-sign',
'f144': 'icon-play-sign',
'f145': 'icon-ticket',
'f146': 'icon-minus-sign-alt',
'f147': 'icon-check-minus',
'f148': 'icon-level-up',
'f149': 'icon-level-down',
'f14a': 'icon-check-sign',
'f14b': 'icon-edit-sign',
'f14c': 'icon-external-link-sign',
'f14d': 'icon-share-sign',
'f14e': 'icon-compass',
'f150': 'icon-collapse',
'f151': 'icon-collapse-top',
'f152': 'icon-expand',
'f153': 'icon-eur',
'f154': 'icon-gbp',
'f155': 'icon-usd',
'f156': 'icon-inr',
'f157': 'icon-jpy',
'f158': 'icon-cny',
'f159': 'icon-krw',
'f15a': 'icon-btc',
'f15b': 'icon-file',
'f15c': 'icon-file-text',
'f15d': 'icon-sort-by-alphabet',
'f15e': 'icon-sort-by-alphabet-alt',
'f160': 'icon-sort-by-attributes',
'f161': 'icon-sort-by-attributes-alt',
'f162': 'icon-sort-by-order',
'f163': 'icon-sort-by-order-alt',
'f164': 'icon-thumbs-up',
'f165': 'icon-thumbs-down',
'f166': 'icon-youtube-sign',
'f167': 'icon-youtube',
'f168': 'icon-xing',
'f169': 'icon-xing-sign',
'f16a': 'icon-youtube-play',
'f16b': 'icon-dropbox',
'f16c': 'icon-stackexchange',
'f16d': 'icon-instagram',
'f16e': 'icon-flickr',
'f170': 'icon-adn',
'f171': 'icon-bitbucket',
'f172': 'icon-bitbucket-sign',
'f173': 'icon-tumblr',
'f174': 'icon-tumblr-sign',
'f175': 'icon-long-arrow-down',
'f176': 'icon-long-arrow-up',
'f177': 'icon-long-arrow-left',
'f178': 'icon-long-arrow-right',
'f179': 'icon-apple',
'f17a': 'icon-windows',
'f17b': 'icon-android',
'f17c': 'icon-linux',
'f17d': 'icon-dribbble',
'f17e': 'icon-skype',
'f180': 'icon-foursquare',
'f181': 'icon-trello',
'f182': 'icon-female',
'f183': 'icon-male',
'f184': 'icon-gittip',
'f185': 'icon-sun',
'f186': 'icon-moon',
'f187': 'icon-archive',
'f188': 'icon-bug',
'f189': 'icon-vk',
'f18a': 'icon-weibo',
'f18b': 'icon-renren',
};
var s = app.activeDocument.selection;
var code;
for (var i in s) {
code = s[i].toString().charCodeAt().toString(16);
if (map[code]) {
alert(map[code]);
return;
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment