Added js controls logic - control prepend or append for comments

Added js controls logic which is backwards compatible but allows is_reversed to be specified