A few notes for beginners:
- When you save an update of your contentscript file(s), you need to refresh the plugin in your browsers extension directory: chrome://extensions/
- To debug the browser action, you need to right click on it and choose Inspect Popup. This will open a separate Developer Tools window for it.
I did run into a couple of minor issues along the way:
- I started getting warnings in my developer tools console about a jQuery map file missing. I ended up having to download the file it was looking for and include it alongside the jQuery file in my resources.
- I also got some cryptic error when attempting to run the query SELECT Id, Name FROM Case that I posted to the Salesforce StackExchange site. While I thought it had something to do with a CORS issue, it turns out I was querying for the non-existent Name attribute on the Case object…
The POC itself obviously has a lot of features lacking (and bugs), but it gave me some good ideas on better ways to bring this functionality to users. I’ve actually realized that adding another tab to the Developer Tools would be a much better place to run queries (similar to how the AngularJS Batarang extension is implemented).
If you want to take a look at the source code, I put it on GitHub.