Skip to content

Instantly share code, notes, and snippets.

@billmei
Created August 29, 2020 02:32
Show Gist options
  • Save billmei/9f715097b2fe92b3906d4028c2765499 to your computer and use it in GitHub Desktop.
Save billmei/9f715097b2fe92b3906d4028c2765499 to your computer and use it in GitHub Desktop.
Inject jQuery into a page. Useful from the DevTools console if the site doesn't have jQuery. Avoids CSP issues.
// From https://stackoverflow.com/a/55885836/2142259
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"
document.getElementsByTagName('head')[0].appendChild(jq);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment