I was thinking about native messaging at first, but it requires quite a bit of work and has some limitations:
The application’s location can’t be changed.
The application uninstallation becomes a lot harder, because for example on Windows it will have to undo certain registry changes for a clean uninstall.
The application will have to detect which browser the user uses, and install the native messaging manifest in the correct location. The installation process for an application to be reachable via native messaging is not the same for all browsers.
What I am currently doing is building a WebExtension with TypeScript, which is listening in on the CG IDE’s events, and sending the appropriate events to the ide. These are the same as the ones used in the js/content.js file in the CG Sync extension.
For the file-watching, I am probably going to write a JavaFX app that spins up a little websocket server. The WebExtension can then connect to this websocket server, and there can be two-way communication between the application and the extension. The little downside is that you got a websocket server running in the background, which takes a bit of RAM, but since RAM is quite cheap nowadays I don’t think it’s going to be a problem.
I initially was thinking about making the application in Electron (which is basically JS for desktop applications), but to be able to have fluent auto-updating in an Electron app, you’ll have to pay quite a bit of money to sign the application on all platforms. Since I want it to be a free application, I dropped that choice and am probably going with Java now, because there is a library that supports easy auto-updating (without needing to sign the application) here. This would allow me to simply put some files up on my personal website, after which auto-updating will be smooth and easy for all platforms, which is quite important.
Furthermore, while the CG Sync extension could be reused, I prefer to completely re-do it since the communication with the application will be completely different, and CG Sync’s coding style does not go well with my current preference. On top of that, I somewhat prefer to do it in TypeScript because it gives better auto-completion, and because I used it in a previous WebExtension aswell so I already had the building process laying around.
Development on the extension is going quite well, and since this is my main hobby project at the moment I am quite confident it can be done before 2018 hits.
Would like to try this out but I’m getting a “Choose File Cancelled (or File Error)” message when I click on “Choose a local file”. I’m using vivaldi as a browser so this is probably the reason. Can this be fixed?
I have installed Ext and APP.
When I click “Use an external code editor/ON” in Settings, nothing is happeming. In DevTools/Console following bug is appearing:
Error in event handler: TypeError: Cannot read property 'URL' of null
at chrome-extension://ldjnbdgcceengbjkalemckffhaajkehd/js/content.js:206:26
app.904910d5.js:57 XHR finished loading: POST "https://www.codingame.com/services/Leaderboards/getUserArenaDivisionRoomRankingByTestSessionHandle".
Any ideas what is wrong? Is it a bug or I missed something during the installation?
Hi. I’v seen an video where the coder has Player.java, Map.java and other classes and it all gets synced into Player.java in codingame.
When I use it, it only syncs Player.java and anything else (unless I place the classes inside the Player.java file). Is there any trick/tip on how to achieve it?
Thanks
Edit: He replied to me in youtube. He uses his own library:
I’ve managed to make this work (MacOs / Brave). Thanks.
Do you think you could release the code ? Seems like nothing has been done for the last 4 years on this side and that would be a really appreciated functionality. By hosting the code on any decent git platform (Gitlab is 100%) we could even make some PR.
One thing I’ld be glad to get (or implement) would be auto-exporting of logs. Having only the “video” frame on the website would be awesome so that we can get technical datas out of the browser …
Btw, having access to an API would be even greater and would simplify everything