Skip to content

Instantly share code, notes, and snippets.

@jesusgoku
Created March 24, 2015 17:32
Show Gist options
  • Save jesusgoku/f88f4416497ef365724d to your computer and use it in GitHub Desktop.
Save jesusgoku/f88f4416497ef365724d to your computer and use it in GitHub Desktop.
Added JavaScript and CSS files to page
function addScript(url) {
var head, script;
head = document.querySelector('head');
script = document.createElement('script');
script.type = 'text/javascript';
script.src = url; head.appendChild(script);
};
function addStylesheet(url) {
var head, link;
head = document.querySelector('head');
link = document.createElement('link');
link.type = 'text/css';
link.rel = 'stylesheet';
link.href = url;
head.appendChild(link);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment