You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 6, 2022. It is now read-only.
We currently implement the fetch standard, which is present starting Chromium 42 and Firefox 39.
In FHP.js, we can really simplify it a LOT, and use better code practices supported in these versions, such as:
document.createElement instead of Element.innerHTML - XSS could be a thing, but moderation is implemented in the main website. Really, you should just use .innerText, It's supported in most browsers.
Use const or let instead of var. The declaration var isn't really good (search it up on google, there are loads of things).
Use for .... of .... iterators instead of for (j = 0; j < .... iterators. It's supported in most browsers, and we really don't need the index of the member in the array.
We shouldn't keep calling document.getElementById(string) every single time we need to update it in the same section of the code. We should just declare a variable!
I hope you take this into consideration, as this would introduce new JavaScript programmers to better solutions for code, instead of old ones.