JavaScript modification