function save_options() {

}

function restore_options() {

}

document.addEventListener('DOMContentLoaded', restore_options);
document.getElementById('save').addEventListener('click', save_options);

function restore_options() {}
$(function() {
    restore_options();
});

Update to jQuery