static/grunticon.embed.js
function(stylesheet, refresh){
		if( icons && !refresh ){
			return icons;
		}

		icons = {};

		// get grunticon stylesheet by its href
		var svgss,
			rules, cssText,
			iconClass, iconSVGEncoded, iconSVGRaw;

		svgss = stylesheet.sheet;

		if( !svgss ){ return icons; }

		rules = svgss.cssRules ? svgss.cssRules : svgss.rules;
		for( var i = 0; i < rules.length; i++ ){
			cssText = rules[ i ].cssText;
			iconClass = selectorPlaceholder + rules[ i ].selectorText;
			iconSVGEncoded = cssText.split( ");" )[ 0 ].match( /US\-ASCII\,([^"']+)/ );
			if( iconSVGEncoded && iconSVGEncoded[ 1 ] ){
				iconSVGRaw = decodeURIComponent( iconSVGEncoded[ 1 ] );
				icons[ iconClass ] = iconSVGRaw;

			}
		}
		return icons;
	}
function(stylesheet, refresh){
		if( icons && !refresh ){
			return icons;
		}

		icons = {};

		// get grunticon stylesheet by its href
		var svgss,
			rules, cssText,
			iconClass, iconSVGEncoded, iconSVGRaw;

		svgss = stylesheet.sheet;

		if( !svgss ){ return icons; }

		rules = svgss.cssRules ? svgss.cssRules : svgss.rules;
		for( var i = 0; i < rules.length; i++ ){
			cssText = rules[ i ].cssText;
			iconClass = selectorPlaceholder + rules[ i ].selectorText;
			iconSVGEncoded = cssText.split( ");" )[ 0 ].match( /US\-ASCII\,([^"']+)/ );
			if( iconSVGEncoded && iconSVGEncoded[ 1 ] ){
				iconSVGRaw = decodeURIComponent( iconSVGEncoded[ 1 ] );
				icons[ iconClass ] = iconSVGRaw;

			}
		}
		return icons;
	}
function ( stylesheet , refresh ) { if ( icons && ! refresh ) { return icons ; } icons = { } ; // get grunticon stylesheet by its href var svgss , rules , cssText , iconClass , iconSVGEncoded , iconSVGRaw ; svgss = stylesheet . sheet ; if ( ! svgss ) { return icons ; } rules = svgss . cssRules ? svgss . cssRules : svgss . rules ; for ( var i = 0 ; i < rules . length ; i ++ ) { cssText = rules [ i ] . cssText ; iconClass = selectorPlaceholder + rules [ i ] . selectorText ; iconSVGEncoded = cssText . split ( ");" ) [ 0 ] . match ( / US\-ASCII\,([^"']+) / ) ; if ( iconSVGEncoded && iconSVGEncoded [ 1 ] ) { iconSVGRaw = decodeURIComponent ( iconSVGEncoded [ 1 ] ) ; icons [ iconClass ] = iconSVGRaw ; } } return icons ; }
this function can rip the svg markup from the css so we can embed it anywhere
this function can rip the svg markup from the css so we can embed it anywhere