Simplifying things to search.js

According to https://github.com/composer/packagist/pull/446, I made the necessary changes.