| 1 |
/* To avoid CSS expressions while still supporting IE 7 and IE 6, use this script */ |
| 2 |
/* The script tag referencing this file must be placed before the ending body tag. */ |
| 3 |
|
| 4 |
/* Use conditional comments in order to target IE 7 and older: |
| 5 |
<!--[if lt IE 8]><!--> |
| 6 |
<script src="ie7/ie7.js"></script> |
| 7 |
<!--<![endif]--> |
| 8 |
*/ |
| 9 |
|
| 10 |
(function() { |
| 11 |
function addIcon(el, entity) { |
| 12 |
var html = el.innerHTML; |
| 13 |
el.innerHTML = '<span style="font-family: \'btd-icon\'">' + entity + '</span>' + html; |
| 14 |
} |
| 15 |
var icons = { |
| 16 |
'btd-add-line': '', |
| 17 |
'btd-close-fill': '', |
| 18 |
'btd-copy': '', |
| 19 |
'btd-moon': '', |
| 20 |
'btd-search': '', |
| 21 |
'btd-sun': '', |
| 22 |
'btd-crown': '', |
| 23 |
'btd-lock': '', |
| 24 |
'btd-delete': '', |
| 25 |
'btd-upload': '', |
| 26 |
'btd-tick': '', |
| 27 |
'btd-duplicate': '', |
| 28 |
'btd-lock-open': '', |
| 29 |
'btd-key': '', |
| 30 |
'btd-arrow-up': '', |
| 31 |
'0': 0 |
| 32 |
}, |
| 33 |
els = document.getElementsByTagName('*'), |
| 34 |
i, c, el; |
| 35 |
for (i = 0; ; i += 1) { |
| 36 |
el = els[i]; |
| 37 |
if(!el) { |
| 38 |
break; |
| 39 |
} |
| 40 |
c = el.className; |
| 41 |
c = c.match(/btd-[^\s'"]+/); |
| 42 |
if (c && icons[c[0]]) { |
| 43 |
addIcon(el, icons[c[0]]); |
| 44 |
} |
| 45 |
} |
| 46 |
}()); |
| 47 |
|