function restore_options() { chrome.storage.local.get('baseURL', function (result) { document.getElementById('open-stammtv').href = result.baseURL; }); } document.addEventListener('DOMContentLoaded', restore_options);