Don't redefine functions for each AJAX request!
Auto-activate notifications if permission is granted
Saving prefs to localStorage