Sha256: ec7d6a375ccf3ddf274eeff8f125b884535560a7c19f855d4dd1b0c927d9543f
Contents?: true
Size: 1.53 KB
Versions: 9
Compression:
Stored size: 1.53 KB
Contents
/* Load this script using conditional IE comments if you need to support IE 7 and IE 6. */ window.onload = function() { function addIcon(el, entity) { var html = el.innerHTML; el.innerHTML = '<span style="font-family: \'Flat-UI-Icons\'">' + entity + '</span>' + html; } var icons = { 'fui-arrow-right' : '', 'fui-arrow-left' : '', 'fui-cmd' : '', 'fui-check-inverted' : '', 'fui-heart' : '', 'fui-location' : '', 'fui-plus' : '', 'fui-check' : '', 'fui-cross' : '', 'fui-list' : '', 'fui-new' : '', 'fui-video' : '', 'fui-photo' : '', 'fui-volume' : '', 'fui-time' : '', 'fui-eye' : '', 'fui-chat' : '', 'fui-search' : '', 'fui-user' : '', 'fui-mail' : '', 'fui-lock' : '', 'fui-gear' : '', 'fui-radio-unchecked' : '', 'fui-radio-checked' : '', 'fui-checkbox-unchecked' : '', 'fui-checkbox-checked' : '', 'fui-calendar-solid' : '', 'fui-pause' : '', 'fui-play' : '', 'fui-check-inverted-2' : '' }, els = document.getElementsByTagName('*'), i, attr, html, c, el; for (i = 0; ; i += 1) { el = els[i]; if(!el) { break; } attr = el.getAttribute('data-icon'); if (attr) { addIcon(el, attr); } c = el.className; c = c.match(/fui-[^\s'"]+/); if (c && icons[c[0]]) { addIcon(el, icons[c[0]]); } } };
Version data entries
9 entries across 9 versions & 4 rubygems