 # Update the settings with the values from the notification section of the
 # options page.
 saveNotifications = ->
-  utils.set 'notifications', $('#notifications').is ':checked'
   timeInSecs = $('#notificationDuration').val()
   timeInSecs = if timeInSecs? then parseInt(timeInSecs, 10) * 1000 else 0
-  utils.set 'notificationDuration', timeInSecs
+  utils.set
+    notifications:        $('#notifications').is ':checked'
+    notificationDuration: timeInSecs
 
 # Updates the settings with the values from the toolbar section of the options
 # page.

  toolbarFeatureName = ''
  toolbarFeatureName = toolbarFeature.val() if toolbarFeature.length
  if $('#toolbarPopup').is(':checked') or not toolbarFeatureName
    utils.set 'toolbarFeature', no
    utils.set 'toolbarPopup', yes
  else
    utils.set 'toolbarFeature', yes
    utils.set 'toolbarPopup', no
  utils.set 'toolbarFeatureDetails', $('#toolbarFeatureDetails').is ':checked'
  utils.set 'toolbarFeatureName', toolbarFeatureName
  ext.updateToolbar()

# Update the settings with the values from the URL shorteners section of the

  $('input[name="enabled_shortener"]').each ->
    $this = $ this
    utils.set $this.attr('id'), $this.is ':checked'
  utils.set
    bitlyApiKey:     $('#bitlyApiKey').val().trim()
    bitlyUsername:   $('#bitlyUsername').val().trim()
    googlOAuth:      $('#googlOAuth').is ':checked'
    yourlsPassword:  $('#yourlsPassword').val()
    yourlsSignature: $('#yourlsSignature').val().trim()
    yourlsUrl:       $('#yourlsUrl').val().trim()
    yourlsUsername:  $('#yourlsUsername').val().trim()

# Update the specified `option` element that represents a feature with the
# values taken from the available input fields.
