adjust javascript to HTML adjustments