Disclaimer: Personal Project
What It Is
For the curious/interested, I created a tampermonkey/greasemonkey script to add a “Publish Event” link to the Particle Console. This allows you to easily send events from your browser while viewing your logs in the Particle Console.
How to Instal/Use
- Install TamperMonkey.
- Go here and click “Raw” to import the script into Tampermonkey. Install the script.
- Go to the Particle Console. A little airplane icon and “Publish Event” link should appear near the “Docs” link. Press it and then follow the prompts to emit an event. Click the “Publish Event” link to launch the process. Follow the prompts.
- Provide feedback to me
How It Works
prompt(...) prompts) asking for the eventName and eventData. Once you submit those it grabs the access token and then calls the event publish API using
I installed the script in tampermonkey but it is not working. No airplane icon appears.
EDIT: Please reinstall/update the script. The bug has been fixed so the “Publish Event” appears on every page
Please try navigating to https://console.particle.io/logs directly. It seems it doesn’t work if you go to the log page from any other page. I’ll work on fixing that. Also, please re-import/update the script since I found another bug that’s now fixed.
I see it now and it works.
Cool. Let me know if you have any issues or suggestions for improvement. I’m going to look into providing a popup/pretty modal
Thanks for making this by the way. I think it should be an official part of the Particle Console.
What are your thoughts on a native Chrome/Firefox extension versus a greasemonkey script? I was able to put together a Chrome extension in ~15 minutes and it seems to work well.
I’m with @nrobinson2000 on this one. This shouldn’t be some external ‘thing’ for specific browsers, this should be built-in. Considering it does nothing more than calling an API when you press a button, it really shouldn’t take long to add, in my opinion.
I certainly agree but while we wait, why not forge ahead if the work is very simple?
I think a Chrome extension would be great until Particle makes this a built-in feature.
Alright. Do you have any interested in collaborating? I will setup a GitHub repo for the extension. Still thinking on a name:
Particle Console - Community Additions?
I am definitely interested. I would love to test the extension. I don’t have very much experience with creating Chrome extensions though.