While I was making needed modifications to
adm\style\permissions.js
I found out some code that could actually be cleaner, faster and even become correct.
Using
Code: Select all
for( ... in ...)
I also found some stuff that could use some improvements.
We don't need as much inline scripts as the ACP has.
in adm\style\forum_fn.js
we have a bad example of browser sniffing. (is_ie)
adm\style\editor.js
could use some of this too.
Proposal:
Cleanup the file permissions.js with cleaner code and, if possible, faster to execute code.
The objective here is to fix errors and make everything as light as possible without compromising significantly the readability of the code.
E.g.
Remove all for(... in ...) with a proper for loop
Remove unneeded if's
Change the variable's names so that they become more clear. E.g. rb is not a good variable name (even in its context).
Any more places you think the js needs cleanup?
Note: I can do this myself.