Skip to content

Instantly share code, notes, and snippets.

View kosmiq's full-sized avatar

Tor Raswill kosmiq

  • KPMG Sweden Lighthouse
  • Sweden
View GitHub Profile
@kosmiq
kosmiq / js_google_fonts_async_ieshim
Last active October 17, 2017 11:34 — forked from thomasmb/gist:b67680a04ae75bc301b7
An updated version of Thomas Bensmanns Load Google Fonts via JS (https://bensmann.no/google-webfonts-performance/) with a SHIM for IE9 and IE8.
WebFontConfig = {
google: { families: [ \'Ek+Mukta:200,800:latin\' ] }
};
var cb = function() {
var wf = document.createElement(\'script\');
wf.src = \'//ajax.googleapis.com/ajax/libs/webfont/1/webfont.js\';
wf.type = \'text/javascript\';
wf.async = \'true\';
var s = document.getElementsByTagName(\'script\')[0];
s.parentNode.insertBefore(wf, s);