Add javascript rules