if (document.readyState === 'interactive' || document.readyState === 'complete') {
    addBookmarks();
}
else {
    window.addEventListener('DOMContentLoaded', function () {
        addBookmarks();
    });
}