Skip to content

Instantly share code, notes, and snippets.

@agnel
Last active September 13, 2017 06:47
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 agnel/911dd8959ecb4b817ab71f2559c31e8f to your computer and use it in GitHub Desktop.
Save agnel/911dd8959ecb4b817ab71f2559c31e8f to your computer and use it in GitHub Desktop.
load any js library into developers console using fetch
// load angular
fetch('https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.8/angular.min.js')
.then(response => response.text())
.then(text => eval(text))
// load $
fetch('http://code.jquery.com/jquery-2.1.0.js')
.then(response => response.text())
.then(text => eval(text))
// load _
fetch('http://underscorejs.org/underscore.js')
.then(response => response.text())
.then(text => eval(text))
// load moment
fetch('https://momentjs.com/downloads/moment.js')
.then(response => response.text())
.then(text => eval(text))
// load moment-range
// https://cdnjs.com/libraries/moment-range
fetch('https://cdnjs.cloudflare.com/ajax/libs/moment-range/3.0.3/moment-range.js')
.then(response => response.text())
.then(text => eval(text))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment