- So it turns out you cannot set user-agent header unless you use an archaic Node.js API so let's do that.
- Changed repository URLs to point to GitLab where new repository is.
- Added reporting of plugin version as user-agent in HTTP requests.
- Update publish instructions.
- Update issues path.
Small change to send the local time offset along with the coding timestamp. This will be user in the future for different graphs on the website.
The old way of detecting changes in the editor and trying to parse some amount of changed characters from them didn't really work. Sometimes Atom called the change event tens of times repeadetly - which I couldn't reproduce - and that gave users tons of unearned XP. As this happened even after many fixes, I decided to rewrite the plugin. The new version of the plugin listens to keystroke events and thus accurately calculates the amount of XP to give.
Caveats:
- Sometimes keystrokes that don't add characters are counted as XP. For example, if you type ctrl+s, release ctrl and then release s, the s will be counted even though it was not added into the text. I think XP granted by such events will be minimal compared to the amount of code written, so it is not an issue.
- Copypaste operations are not counted unless you use the trick described above. 😛
Other notes:
- Fixed an issue where the plugin would still send XP even though it was disabled.
- Fixed sending pulse even if API key was not set
- Fixed crash when doing "Replace all" (editor was not available)
apm
wanted to bump the version to 1.3.x for some reason
- Don't code while tired and watching TV. Fix for a fix.
- Copypasting and find-replace operations also resulted in huge amounts of XP in some situations. XP was now limited to a max of 200 per operation.
- Fixed an issue where operating on a big file gave ridiculous amounts of XP.
- Added correct licence
- Some doc fixes
- Set upload timer to 10 seconds and ensured it won't upload while typing. This saves the server.
- Added API URL as setting
- Added observing for settings, so that settings are updated automatically
- Added correct default address
- Works quite fine