Skip to content

Instantly share code, notes, and snippets.

@twhid
Last active June 15, 2017 19:30
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 twhid/71f9dcb77ba191116add091bed3c3e59 to your computer and use it in GitHub Desktop.
Save twhid/71f9dcb77ba191116add091bed3c3e59 to your computer and use it in GitHub Desktop.
One-liner return an array of script srcs based on a regex (eg a domain). Handy to use in Chrome's console.
[].slice.call(document.getElementsByTagName('script')).filter(script => /example.com/.test(script.src)).map(script => script.src);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment