Fixing CodeRunner jQuery injection
CodeRunner is one of my favourite development environments on macOS. I use it for small one-off projects or for testing concepts for integration into larger projects. But in version 4.0.3, jQuery injection in a custom HTML page is broken, giving the error:
It’s probably due to some unescaped bit of code in their minified jQuery, but I didn’t have time to work that hard. Instead I reported the error to the developer an fixed it myself. The original (default) run script for jQuery is:
echo "<script>$(cat "$CR_SCRIPTS_DIR/jquery.min.js")</script><script src=\"file://$PWD/$filename\"></script>"
Instead, I just pointed the jQuery source path to a local file on my drive. It also has the advantage of allowing me to use whatever version of jQuery that I want. So the new run script is:
echo "<script src=\"file:///Users/alan/Documents/dev/jquery.min.js\"></script><script src=\"file://$PWD/$filename\"></script>"
Problem solved and back to work.