src/upup.js
function(settings) {
      this.addSettings(settings);

      // register the service worker
      _serviceWorker.register(_settings['service-worker-url'], _settings['registration-options']).then(function(registration) {
        // Registration was successful
        if (_debugState) {
          console.log('Service worker registration successful with scope: %c'+registration.scope, _debugStyle);
        }

        // Send the settings to the service worker
        var messenger = registration.installing || _serviceWorker.controller || registration.active;
        messenger.postMessage({'action': 'set-settings', 'settings': _settings});

      }).catch(function(err) {
        // registration failed :(
        if (_debugState) {
          console.log('Service worker registration failed: %c'+err, _debugStyle);
        }
      });
    }
function(settings) {
      this.addSettings(settings);

      // register the service worker
      _serviceWorker.register(_settings['service-worker-url'], _settings['registration-options']).then(function(registration) {
        // Registration was successful
        if (_debugState) {
          console.log('Service worker registration successful with scope: %c'+registration.scope, _debugStyle);
        }

        // Send the settings to the service worker
        var messenger = registration.installing || _serviceWorker.controller || registration.active;
        messenger.postMessage({'action': 'set-settings', 'settings': _settings});

      }).catch(function(err) {
        // registration failed :(
        if (_debugState) {
          console.log('Service worker registration failed: %c'+err, _debugStyle);
        }
      });
    }
function ( settings ) { this . addSettings ( settings ) ; // register the service worker _serviceWorker . register ( _settings [ 'service-worker-url' ] , _settings [ 'registration-options' ] ) . then ( function ( registration ) { // Registration was successful if ( _debugState ) { console . log ( 'Service worker registration successful with scope: %c' + registration . scope , _debugStyle ) ; } // Send the settings to the service worker var messenger = registration . installing || _serviceWorker . controller || registration . active ; messenger . postMessage ( { 'action' : 'set-settings' , 'settings' : _settings } ) ; } ) . catch ( function ( err ) { // registration failed :( if ( _debugState ) { console . log ( 'Service worker registration failed: %c' + err , _debugStyle ) ; } } ) ; }
Make this site available offline

Can receive a settings object directly, or be configured by running addSettings() first.
See Settings section of docs for details.

#### Examples:
````javascript
// Set up offline mode with a basic message
UpUp.start({ content: 'Cannot reach site. Please check your internet connection.' });

// Set up offline mode with the settings defined previously via addSettings()
UpUp.start();
````

@param {Object} [settings] - Settings for offline mode
@method start
Make this site available offline