Skip to content

Instantly share code, notes, and snippets.

@painteddigital
Last active April 12, 2017 15:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save painteddigital/a70d4c2df6a9c8deca5c to your computer and use it in GitHub Desktop.
Save painteddigital/a70d4c2df6a9c8deca5c to your computer and use it in GitHub Desktop.
Paste this into your console to play with velocity on a page that doesn't have it. It assumes jQuery exists already
(function() {
var url = ["cdn.jsdelivr.net/velocity/1.1.0/velocity.min.js","cdn.jsdelivr.net/velocity/1.1.0/velocity.ui.min.js"];
for(var i=0; i < url.length; i++){
var v = document.createElement('script'); v.type = 'text/javascript'; v.async = true;
v.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + url[i];
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(v, s);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment