Added php rtrim method to Javascript lol.