This is a concept show, it does not include changes to notes.js as same. I think and suggest you use a better way to organize these variables, such as the simple method I showed to collect and identify its role, so as not to mix the these variables (const) with the real variables.
In addition, you can use an array/class and uniform naming to organize meta name, element IDs and variables to handle them with logical looping code.
You can also create a helper function like $e() (just like $() in jQuery) instead of a repeated long reference document.getElementById().
I am concerned about this project because it is a good idea and prototype, and I expect it to be i18n. But the existing code style will bring great risks and challenges as it grows. Looking forward to your insights.
This is a concept show, it does not include changes to
notes.js
as same. I think and suggest you use a better way to organize these variables, such as the simple method I showed to collect and identify its role, so as not to mix the these variables (const) with the real variables.In addition, you can use an array/class and uniform naming to organize meta name, element IDs and variables to handle them with logical looping code. You can also create a helper function like
$e()
(just like$()
in jQuery) instead of a repeated long referencedocument.getElementById()
.I am concerned about this project because it is a good idea and prototype, and I expect it to be i18n. But the existing code style will bring great risks and challenges as it grows. Looking forward to your insights.