Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Keep default
Search.init
behavior if addons injected
The extension removes the call to `Search.init` because it needs to perform some injection before calling this method. The old implementation of the `readthedocs-doc-embed.js` calls this method manually after modifying some stuff. However, with the introduction of addons, we don't want to manipulate the defaults and the Sphinx default search should work out-of-the-box. To keep the default behavior when addons is enabled, we check for addons javascript and if it's present we call `_ready(Search.init);` as the default Sphinx code does. See readthedocs/addons#213 for more information.
- Loading branch information