-
Notifications
You must be signed in to change notification settings - Fork 5
/
lte-ie7.js
166 lines (165 loc) · 6.63 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
/* Use this script 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: \'Android-Action-Bar-Icon-Pack\'">' + entity + '</span>' + html;
}
var icons = {
'icon-navigation-back' : '',
'icon-navigation-accept' : '',
'icon-navigation-cancel' : '',
'icon-navigation-collapse' : '',
'icon-navigation-expand' : '',
'icon-navigation-forward' : '',
'icon-navigation-next-item' : '',
'icon-navigation-previous-item' : '',
'icon-navigation-refresh' : '',
'icon-action-about' : '',
'icon-action-help' : '',
'icon-action-search' : '',
'icon-action-settings' : '',
'icon-rating-bad' : '',
'icon-rating-favorite' : '',
'icon-rating-good' : '',
'icon-rating-half-important' : '',
'icon-rating-important' : '',
'icon-rating-not-important' : '',
'icon-collections-cloud' : '',
'icon-collections-collection' : '',
'icon-collections-go-to-today' : '',
'icon-collections-labels' : '',
'icon-collections-new-label' : '',
'icon-collections-sort-by-size' : '',
'icon-collections-view-as-grid' : '',
'icon-collections-view-as-list' : '',
'icon-content-attachment' : '',
'icon-content-backspace' : '',
'icon-content-copy' : '',
'icon-content-cut' : '',
'icon-content-discard' : '',
'icon-content-edit' : '',
'icon-content-email' : '',
'icon-content-event' : '',
'icon-content-import-export' : '',
'icon-content-merge' : '',
'icon-content-new' : '',
'icon-content-new-attachment' : '',
'icon-content-new-email' : '',
'icon-content-new-event' : '',
'icon-content-new-picture' : '',
'icon-content-paste' : '',
'icon-content-picture' : '',
'icon-content-read' : '',
'icon-content-remove' : '',
'icon-content-save' : '',
'icon-content-select-all' : '',
'icon-content-split' : '',
'icon-content-undo' : '',
'icon-content-unread' : '',
'icon-social-add-group' : '',
'icon-social-add-person' : '',
'icon-social-cc-bcc' : '',
'icon-social-chat' : '',
'icon-social-forward' : '',
'icon-social-group' : '',
'icon-social-person' : '',
'icon-social-reply' : '',
'icon-social-reply-all' : '',
'icon-social-send-now' : '',
'icon-social-share' : '',
'icon-location-directions' : '',
'icon-location-map' : '',
'icon-location-place' : '',
'icon-location-web-site' : '',
'icon-images-crop' : '',
'icon-images-rotate-left' : '',
'icon-images-rotate-right' : '',
'icon-images-slideshow' : '',
'icon-av-add-to-queue' : '',
'icon-av-download' : '',
'icon-av-fast-forward' : '',
'icon-av-full-screen' : '',
'icon-av-make-available-offline' : '',
'icon-av-next' : '',
'icon-av-pause' : '',
'icon-av-pause-over-video' : '',
'icon-av-play' : '',
'icon-av-play-over-video' : '',
'icon-av-previous' : '',
'icon-av-repeat' : '',
'icon-av-replay' : '',
'icon-av-return-from-full-screen' : '',
'icon-av-rewind' : '',
'icon-av-shuffle' : '',
'icon-av-stop' : '',
'icon-av-upload' : '',
'icon-device-access-accounts' : '',
'icon-device-access-add-alarm' : '',
'icon-device-access-alarms' : '',
'icon-device-access-battery' : '',
'icon-device-access-bightness-low' : '',
'icon-device-access-bluetooth' : '',
'icon-device-access-bluetooth-connected' : '',
'icon-device-access-bluetooth-searching' : '',
'icon-device-access-brightness-auto' : '',
'icon-device-access-brightness-high' : '',
'icon-device-access-brightness-medium' : '',
'icon-device-access-call' : '',
'icon-device-access-camera' : '',
'icon-device-access-data-usage' : '',
'icon-device-access-dial-pad' : '',
'icon-device-access-end-call' : '',
'icon-device-access-flash-automatic' : '',
'icon-device-access-flash-off' : '',
'icon-device-access-flash-on' : '',
'icon-device-access-location-found' : '',
'icon-device-access-location-off' : '',
'icon-device-access-location-searching' : '',
'icon-device-access-mic' : '',
'icon-device-access-mic-muted' : '',
'icon-device-access-network-cell' : '',
'icon-device-access-network-wifi' : '',
'icon-device-access-new-account' : '',
'icon-device-access-not-secure' : '',
'icon-device-access-ring-volume' : '',
'icon-device-access-screen-locked-to-landscape' : '',
'icon-device-access-screen-locked-to-portrait' : '',
'icon-device-access-screen-rotation' : '',
'icon-device-access-sd-storage' : '',
'icon-device-access-secure' : '',
'icon-device-access-storage' : '',
'icon-device-access-switch-camera' : '',
'icon-device-access-switch-video' : '',
'icon-device-access-time' : '',
'icon-device-access-usb' : '',
'icon-device-access-video' : '',
'icon-device-access-volume-muted' : '',
'icon-device-access-volume-on' : '',
'icon-alerts-and-states-airplane-mode-off' : '',
'icon-alerts-and-states-airplane-mode-on' : '',
'icon-alerts-and-states-error' : '',
'icon-alerts-and-states-warning' : '',
'icon-hardware-computer' : '',
'icon-hardware-dock' : '',
'icon-hardware-gamepad' : '',
'icon-hardware-headphones' : '',
'icon-hardware-headset' : '',
'icon-hardware-keyboard' : '',
'icon-hardware-mouse' : '',
'icon-hardware-phone' : ''
},
els = document.getElementsByTagName('*'),
i, attr, html, c, el;
for (i = 0; i < els.length; i += 1) {
el = els[i];
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]]);
}
}
};