forked from pprince/etlinefont-bower
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlte-ie7.js
127 lines (126 loc) · 3.74 KB
/
lte-ie7.js
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/* 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: \'et-line\'">' + entity + '</span>' + html;
}
var icons = {
'icon-mobile' : '',
'icon-laptop' : '',
'icon-desktop' : '',
'icon-tablet' : '',
'icon-phone' : '',
'icon-document' : '',
'icon-documents' : '',
'icon-search' : '',
'icon-clipboard' : '',
'icon-newspaper' : '',
'icon-notebook' : '',
'icon-book-open' : '',
'icon-browser' : '',
'icon-calendar' : '',
'icon-presentation' : '',
'icon-picture' : '',
'icon-pictures' : '',
'icon-video' : '',
'icon-camera' : '',
'icon-printer' : '',
'icon-toolbox' : '',
'icon-briefcase' : '',
'icon-wallet' : '',
'icon-gift' : '',
'icon-bargraph' : '',
'icon-grid' : '',
'icon-expand' : '',
'icon-focus' : '',
'icon-edit' : '',
'icon-adjustments' : '',
'icon-ribbon' : '',
'icon-hourglass' : '',
'icon-lock' : '',
'icon-megaphone' : '',
'icon-shield' : '',
'icon-trophy' : '',
'icon-flag' : '',
'icon-map' : '',
'icon-puzzle' : '',
'icon-basket' : '',
'icon-envelope' : '',
'icon-streetsign' : '',
'icon-telescope' : '',
'icon-gears' : '',
'icon-key' : '',
'icon-paperclip' : '',
'icon-attachment' : '',
'icon-pricetags' : '',
'icon-lightbulb' : '',
'icon-layers' : '',
'icon-pencil' : '',
'icon-tools' : '',
'icon-tools-2' : '',
'icon-scissors' : '',
'icon-paintbrush' : '',
'icon-magnifying-glass' : '',
'icon-circle-compass' : '',
'icon-linegraph' : '',
'icon-mic' : '',
'icon-strategy' : '',
'icon-beaker' : '',
'icon-caution' : '',
'icon-recycle' : '',
'icon-anchor' : '',
'icon-profile-male' : '',
'icon-profile-female' : '',
'icon-bike' : '',
'icon-wine' : '',
'icon-hotairballoon' : '',
'icon-globe' : '',
'icon-genius' : '',
'icon-map-pin' : '',
'icon-dial' : '',
'icon-chat' : '',
'icon-heart' : '',
'icon-cloud' : '',
'icon-upload' : '',
'icon-download' : '',
'icon-target' : '',
'icon-hazardous' : '',
'icon-piechart' : '',
'icon-speedometer' : '',
'icon-global' : '',
'icon-compass' : '',
'icon-lifesaver' : '',
'icon-clock' : '',
'icon-aperture' : '',
'icon-quote' : '',
'icon-scope' : '',
'icon-alarmclock' : '',
'icon-refresh' : '',
'icon-happy' : '',
'icon-sad' : '',
'icon-facebook' : '',
'icon-twitter' : '',
'icon-googleplus' : '',
'icon-rss' : '',
'icon-tumblr' : '',
'icon-linkedin' : '',
'icon-dribbble' : ''
},
els = document.getElementsByTagName('*'),
i, attr, 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(/icon-[^\s'"]+/);
if (c && icons[c[0]]) {
addIcon(el, icons[c[0]]);
}
}
};