Newer
Older
fonts / ie7 / ie7.js
@TLCD96 TLCD96 on 5 Nov 2023 2 KB 1.9
/* 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: \'tlcd96\'">' + entity + '</span>' + html;
	}
	var icons = {
		'tlcd96-fonts-apocalipse': '&#xe91e;',
		'tlcd96-fonts-light-dark': '&#xe91e;',
		'tlcd96-fonts-checkmark': '&#xe91f;',
		'tlcd96-fonts-check': '&#xe91f;',
		'tlcd96-fonts-chevron-down': '&#xe900;',
		'tlcd96-fonts-chevron-down-left': '&#xe901;',
		'tlcd96-fonts-chevron-down-right': '&#xe902;',
		'tlcd96-fonts-chevron-left': '&#xe903;',
		'tlcd96-fonts-chevron-right': '&#xe904;',
		'tlcd96-fonts-chevron-up': '&#xe905;',
		'tlcd96-fonts-chevron-up-left': '&#xe906;',
		'tlcd96-fonts-chevron-up-right': '&#xe907;',
		'tlcd96-fonts-clipboard': '&#xe908;',
		'tlcd96-fonts-clock': '&#xe926;',
		'tlcd96-fonts-time': '&#xe926;',
		'tlcd96-fonts-code': '&#xe920;',
		'tlcd96-fonts-cog': '&#xe909;',
		'tlcd96-fonts-settings': '&#xe909;',
		'tlcd96-fonts-context': '&#xe90a;',
		'tlcd96-fonts-copy': '&#xe90b;',
		'tlcd96-fonts-expand': '&#xe90c;',
		'tlcd96-fonts-maximize': '&#xe921;',
		'tlcd96-fonts-window-maximize': '&#xe921;',
		'tlcd96-fonts-minimize': '&#xe922;',
		'tlcd96-fonts-window-minimizee': '&#xe922;',
		'tlcd96-fonts-moon': '&#xe91d;',
		'tlcd96-fonts-dark': '&#xe91d;',
		'tlcd96-fonts-dark-mode': '&#xe91d;',
		'tlcd96-fonts-darkmode': '&#xe91d;',
		'tlcd96-fonts-paste': '&#xe90d;',
		'tlcd96-fonts-right-left': '&#xe923;',
		'tlcd96-fonts-share': '&#xe90e;',
		'tlcd96-fonts-shuffle': '&#xe925;',
		'tlcd96-fonts-suffle': '&#xe925;',
		'tlcd96-fonts-sliders': '&#xe924;',
		'tlcd96-fonts-social-crowdin': '&#xe90f;',
		'tlcd96-fonts-social-discord': '&#xe910;',
		'tlcd96-fonts-social-discord-server': '&#xe911;',
		'tlcd96-fonts-social-discord-user': '&#xe912;',
		'tlcd96-fonts-social-facebook': '&#xe91b;',
		'tlcd96-fonts-social-instagram': '&#xe91c;',
		'tlcd96-fonts-social-oneux': '&#xe913;',
		'tlcd96-fonts-social-twitter': '&#xe914;',
		'tlcd96-fonts-social-x': '&#xe914;',
		'tlcd96-fonts-social-youtube': '&#xe915;',
		'tlcd96-fonts-social-youtube-user': '&#xe916;',
		'tlcd96-fonts-software': '&#xe917;',
		'tlcd96-fonts-program': '&#xe917;',
		'tlcd96-fonts-stack': '&#xe918;',
		'tlcd96-fonts-sun': '&#xe91a;',
		'tlcd96-fonts-light': '&#xe91a;',
		'tlcd96-fonts-light-mode': '&#xe91a;',
		'tlcd96-fonts-lightmode': '&#xe91a;',
		'tlcd96-fonts-times': '&#xe919;',
		'tlcd96-fonts-close': '&#xe919;',
		'tlcd96-fonts-x': '&#xe919;',
		'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(/tlcd96-fonts-[^\s'"]+/);
		if (c && icons[c[0]]) {
			addIcon(el, icons[c[0]]);
		}
	}
}());