forked from jonathantneal/svg4everybody
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvg4everybody.ie8.min.js
1 lines (1 loc) · 1.12 KB
/
svg4everybody.ie8.min.js
1
(function(e,t,n,r,i,s){function o(t,n){if(n){var r=n.getAttribute("viewBox"),i=e.createDocumentFragment(),s=n.cloneNode(true);if(r){t.setAttribute("viewBox",r)}while(s.childNodes.length){i.appendChild(s.childNodes[0])}t.appendChild(i)}}function u(){var t=this,n=e.createElement("x"),r=t.s;n.innerHTML=t.responseText;t.onload=function(){r.splice(0).map(function(e){o(e[0],n.querySelector("#"+e[1].replace(/(\W)/g,"\\$1")))})};t.onload()}function a(){var s;while(s=t[0]){if(i){var f=new Image;f.src=s.getAttribute("xlink:href").replace("#",".").replace(/^\./,"")+".png";s.parentNode.replaceChild(f,s)}else{var l=s.parentNode,c=s.getAttribute("xlink:href").split("#"),h=c[0],p=c[1];l.removeChild(s);if(h.length){var d=r[h]=r[h]||new XMLHttpRequest;if(!d.s){d.s=[];d.open("GET",h);d.onload=u;d.send()}d.s.push([l,p]);if(d.readyState===4){d.onload()}}else{o(l,e.getElementById(p))}}}n(a)}if(i||s){a()}})(document,document.getElementsByTagName("use"),window.requestAnimationFrame||window.setTimeout,{},/MSIE\s[1-8]\b/.test(navigator.userAgent),/Trident\/[567]\b/.test(navigator.userAgent),document.createElement("svg"),document.createElement("use"))