Refactored strip_javascript_params()

Removed dead code