How can I go about using jQuery in the Firefox Scratchpad?
I have Firefox v54.0.1.
I googled it and found some articles mentioning how the Firefox Scratchpad had jQuery built-in but those articles were written back when the Scratchpad was first released.
http://www.davidhayden.me/blog/jquery-and-javascript-development-using-firefox-scratchpad
I originally just tried the jQuery code and when it wasn't working I threw in the CDN for it.. I was desperate..
Any suggestion is appreciated!
Thanks!
EDIT: (Added Dave's suggestion)
You should be able to inject a script element by adding this code at the beginning of the scratchpad. Additionally you need to wait for it to load, you you'll need to run your code in a callback
let jq = document.createElement("script");
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js";
jq.onload = function() {
//your code here
};
document.body.appendChild(jq);