ie7.js
2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* To avoid CSS expressions while still supporting IE 7 and IE 6, use this script */
/* The script tag referencing this file must be placed before the ending body tag. */
/* Use conditional comments in order to target IE 7 and older:
<!--[if lt IE 8]><!-->
<script src="ie7/ie7.js"></script>
<!--<![endif]-->
*/
(function() {
function addIcon(el, entity) {
var html = el.innerHTML;
el.innerHTML = '<span style="font-family: \'icon-coms02\'">' + entity + '</span>' + html;
}
var icons = {
'icon-coms02-Exit-full-screen': '',
'icon-coms02-core-mail': '',
'icon-coms02-exmail-qq': '',
'icon-coms02-Label': '',
'icon-coms02-Choice': '',
'icon-coms02-download': '',
'icon-coms02-from-Full-screen': '',
'icon-coms02-Report-form': '',
'icon-coms02-Check-work-attendance': '',
'icon-coms02-Positioning': '',
'icon-coms02-Cancel-leave': '',
'icon-coms02-Childrens-education': '',
'icon-coms02-City-information': '',
'icon-coms02-Continuing-Education': '',
'icon-coms02-Dependant-information': '',
'icon-coms02-Educational-information': '',
'icon-coms02-Family-members': '',
'icon-coms02-form-Sign': '',
'icon-coms02-form-to-write': '',
'icon-coms02-from-cancel': '',
'icon-coms02-from-Empty': '',
'icon-coms02-from-SignList': '',
'icon-coms02-from-Switching': '',
'icon-coms02-from-Text': '',
'icon-coms02-Housing-rent': '',
'icon-coms02-Lease-information': '',
'icon-coms02-Loan-contract': '',
'icon-coms02-Loan-interest': '',
'icon-coms02-Old-man': '',
'icon-coms02-Personal-information': '',
'icon-coms02-Real-estate-certificate': '',
'0': 0
},
els = document.getElementsByTagName('*'),
i, c, el;
for (i = 0; ; i += 1) {
el = els[i];
if(!el) {
break;
}
c = el.className;
c = c.match(/icon-coms02-[^\s'"]+/);
if (c && icons[c[0]]) {
addIcon(el, icons[c[0]]);
}
}
}());