 encodeURIComponent(value);
            window.history.pushState("", "", newUrl);
        }
    }

    function getLanguageParameter() {
        var match = RegExp('[?&]lang=([^&]*)').exec(window.location.search);
        return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
    }

    function docReady() {
        window.gitbook.events.bind("page.change", function () {
            pageChanged();
        });

        var searchInput = document.querySelector('#book-search-input input');

        