Skip to content

Instantly share code, notes, and snippets.

@deostroll
Forked from painteddigital/Inject VelocityJS
Last active April 12, 2017 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deostroll/870647e11e0432eacd02b7ad2359919e to your computer and use it in GitHub Desktop.
Save deostroll/870647e11e0432eacd02b7ad2359919e 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 = ['cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.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