Skip to content

Instantly share code, notes, and snippets.

@harriha
Created January 31, 2011 20:36
Show Gist options
  • Save harriha/804751 to your computer and use it in GitHub Desktop.
Save harriha/804751 to your computer and use it in GitHub Desktop.
function enablePhantomLimb(scriptSrc,config){
var script=document.createElement('script');
script.src=scriptSrc;
script.type='text/javascript';
script.addEventListener('load',function(){
if('phantomLimb'in window){
phantomLimb.init(config)
}
else{
console.error('Phantom Limb could not be loaded')
}
},false);
document.head.appendChild(script)
}
enablePhantomLimb('https://github.com/brian-c/phantom-limb/raw/master/phantomLimb.js',{src:'https://github.com/brian-c/phantom-limb/raw/master/limb-black.png',lefty:false});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment