I want to use JQuery on the developers console when accessing the facebook website. However, I get this following error:
Refused to load the script 'https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js' because it violates the following Content Security Policy directive: "script-src blob: data: 'self' 'unsafe-inline' 'unsafe-eval' *.facebook.com *.fbcdn.net *.facebook.net *.google-analytics.com *.google.com *.fbsbx.com". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
The script that I used:
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);
// ... give time for script to load, then type (or see below for non wait option)
jQuery.noConflict();
I have searched online, and have read similar statements, but cannot see what the solution is if any to have it running in chrome developer on the facebook domain. It works well elsewhere for some places.
jQuery.noConflict();
To reuse it in the future use a devtools snippet.