Issues (54)

docs/css/phpdocumentor-clean-icons/lte-ie7.js (1 issue)

Severity
1
/* Load this script using conditional IE comments if you need to support IE 7 and IE 6. */
2
3
window.onload = function() {
4
	function addIcon(el, entity) {
5
		var html = el.innerHTML;
6
		el.innerHTML = '<span style="font-family: \'phpdocumentor-clean-icons\'">' + entity + '</span>' + html;
7
	}
8
	var icons = {
9
			'icon-trait' : '&#xe000;',
10
			'icon-interface' : '&#xe001;',
11
			'icon-class' : '&#xe002;'
12
		},
13
		els = document.getElementsByTagName('*'),
14
		i, attr, html, c, el;
0 ignored issues
show
The variable html seems to be never used. Consider removing it.
Loading history...
15
	for (i = 0; ; i += 1) {
16
		el = els[i];
17
		if(!el) {
18
			break;
19
		}
20
		attr = el.getAttribute('data-icon');
21
		if (attr) {
22
			addIcon(el, attr);
23
		}
24
		c = el.className;
25
		c = c.match(/icon-[^\s'"]+/);
26
		if (c && icons[c[0]]) {
27
			addIcon(el, icons[c[0]]);
28
		}
29
	}
30
};