I have to admit I'm not programming in javascript on daily basis and last time I read something about it was 2010-ish.
I was using old coding practices together with new javascript APIs and in the end the code didn't look too good.
In particular, I was using callbacks for all asynchronous actions (that's basically most of the downloading/processing stuff).
This kicks me in the ass now that I'm developing this item editor, as item loading needs to be asynchronous as well and I need to move around a lot of code.
I did some reading and I'm slowly refactoring everything to newer javascript that can handle such cases much better.
I'm starting with refactoring only the code that needs changes, but to keep the codebase consistent, eventually all of the code will need to be refactored.
As for the personal backlog, here's the list of files to be updated:
* main.js
* map.js
* window.js
* window_db_common.js
* window_find_npcs.js
* window_npc.js
* window_item_finder.js
* window_tpl_finder.js
* window_changes.js
* item.js
done:
* download.js
* log.js
* navbar.js
* db_load.js
* project.js
* db.js
* window_rclick_menu.js