Skip to content

Instantly share code, notes, and snippets.

@make-sum
Created October 20, 2014 20:32
Show Gist options
  • Select an option

  • Save make-sum/b1c7f577d3d054b94cf1 to your computer and use it in GitHub Desktop.

Select an option

Save make-sum/b1c7f577d3d054b94cf1 to your computer and use it in GitHub Desktop.

Revisions

  1. make-sum created this gist Oct 20, 2014.
    12 changes: 12 additions & 0 deletions appendCSS
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    var css = '@import url(http://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,900,700,500,500italic,700italic,900italic);',
    header = document.getElementsByTagName("head")[0],
    style = document.createElement('style');

    style.type = 'text/css';
    if (style.styleSheet){
    style.styleSheet.cssText = css;
    } else {
    style.appendChild(document.createTextNode(css));
    }

    header.appendChild(style);