Skip to content

Instantly share code, notes, and snippets.

@gartnera
gartnera / a.js
Last active April 2, 2016 21:46
webadvisor json roster creator
!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.download=t()}(this,function(){return function e(t,n,o){function a(e){var t=e.split(/[:;,]/),n=t[1],o="base64"==t[2]?atob:decodeURIComponent,a=o(t.pop()),r=a.length,i=0,d=new Uint8Array(r);for(i;r>i;++i)d[i]=a.charCodeAt(i);return new h([d],{type:n})}function r(e,t){if("download"in m)return m.href=e,m.setAttribute("download",v),m.className="download-js-link",m.innerHTML="downloading...",b.body.appendChild(m),setTimeout(function(){m.click(),b.body.removeChild(m),t===!0&&setTimeout(function(){c.URL.revokeObjectURL(m.href)},250)},66),!0;if("undefined"!=typeof safari)return e="data:"+e.replace(/^data:([\w\/\-\+]+)/,s),window.open(e)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=e),!0;var n=b.createElement("iframe");b.body.appendChild(n),t||(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,s)),n.src=e,setTimeout(function(){b.body.remove