Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
in Q2A Core by
b.className=b.className.replace('qa-body-js-off', 'qa-body-js-on');

What is the reason we use this javascript on each page?

Q2A version: 1.6.2

1 Answer

+2 votes

It's a way to allow different CSS style display, based on whether Javascript is enabled or disabled. It's used to prevent notices being displayed if Javascript is off (search qa-theme-base.php for the class name).

If it is only used for the notices, we might not need to use it anymore. I assume that 99% of all users have Javascript activated.