Skip to content

Instantly share code, notes, and snippets.

@scripting
Created October 24, 2015 18:13
Show Gist options
  • Save scripting/cc578f33c105579023df to your computer and use it in GitHub Desktop.
Save scripting/cc578f33c105579023df to your computer and use it in GitHub Desktop.
function useStylesheet (url) {
var head = document.getElementsByTagName ("head") [0];
var styleSheet = document.createElement ("link");
styleSheet.rel = "stylesheet";
styleSheet.type = "text/css";
styleSheet.href = url;
head.appendChild (styleSheet);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment