Skip to content

Instantly share code, notes, and snippets.

@ridhuanhassan
Forked from Saw-mon-and-Natalie/loadExternalJs.md
Created January 11, 2026 21:38
Show Gist options
  • Select an option

  • Save ridhuanhassan/6c7e551bb1781474af8e417eacdbde3c to your computer and use it in GitHub Desktop.

Select an option

Save ridhuanhassan/6c7e551bb1781474af8e417eacdbde3c to your computer and use it in GitHub Desktop.
javascript code snippet to use to load external JS libraries inside chrome dev tools console

How to import external JS libraries in Chrome dev tools console

fetch('link-to-external-js-library')
    .then(response => response.text())
    .then(text => eval(text))

example, loading lodash:

fetch('https://cdn.jsdelivr.net/npm/lodash@4.17.15/lodash.min.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