NOTE: I believe this to be a legitimate question of the type that is welcomed on Stack Overflow. I posted a similar question in late October and it was downvoted and subsequently deleted by the community user. I can’t find the original post, so I’m posting again with modifications to hopefully avoid the downvotes, or at the very least get the common courtesy of a comment explaining why the downvote.
I used to be able to (locally) use either of the following two Chrome extensions to easily inject jQuery into pages that didn’t already have jQuery, and that I didn’t own (client-side) to experiment with design changes, development modifications, and real-time troubleshooting:
Unfortunately, now because of what appears to be the newest craze in preventing “XSS” (cross-site scripting), those plugins no longer work. There may be a noble purpose behind these changes, and I’m just trying to understand WHAT changed. I think it has something to do with “content security policy“, which I’ve only recently heard of and have very little knowledge of.
I first learned about XSS as a browser issue in 2011, however, XSS prevention measures had never prevented me from doing local development before. I’ve been searching for a modern (late 2017) solution, to no avail.
I’m not sure where to go from here.
WHAT I’VE TRIED THAT HASN’T WORKED
Here are plugins I tried (which used to work until about 6 months ago) that no longer work for me:
- jQuery in Console (Plugin)
- jQuery Inject (Plugin)
- jQuery Injector (Plugin)
- GitHub – bluerabbit/jquery-inject: jQuery-inject(Chrome extension)
Here are some of the many links I encountered that offer solutions which no longer work:
- How to inject script into a page using bookmarklet if the Content Security Policy is enabled on the server?
- How to inject jquery to any webpage
- Google Chrome Extensions: How to include jQuery in programmatically injected content script?
- Inject jQuery Onto Any Site | brandon martinez
- Content Scripts – Google Chrome
This last one also looks promising, but I haven’t tried it yet:
How can I inject jQuery (using Chrome Developer Console) into a webpage that doesn’t use jQuery?
Why don’t the above plugins work? Did ALL the browser companies universally roll out some major change this year?
Any help is appreciated.
(P.S.: Ive done my best to be thorough, but concise. Please let me know if anything needs clarification and please leave a comment if you downvote this for any reason explaining why. Thanks in advance.)