dist/hashedit.js
function() {

      var data, xhr;

      data = hashedit.retrieveUpdateArray();

      if (hashedit.saveUrl) {

        // construct an HTTP request
        xhr = new XMLHttpRequest();
        xhr.open('post', hashedit.saveUrl, true);

        // set token
        if(hashedit.useToken == true) {
          xhr.setRequestHeader(hashedit.authHeader, hashedit.authHeaderPrefix + ' ' + localStorage.getItem(hashedit.tokenName));
        }

        // send the collected data as JSON
        xhr.send(JSON.stringify(data));

        xhr.onloadend = function() {

          location.reload();

        };

      }

    }
function() {

      var data, xhr;

      data = hashedit.retrieveUpdateArray();

      if (hashedit.saveUrl) {

        // construct an HTTP request
        xhr = new XMLHttpRequest();
        xhr.open('post', hashedit.saveUrl, true);

        // set token
        if(hashedit.useToken == true) {
          xhr.setRequestHeader(hashedit.authHeader, hashedit.authHeaderPrefix + ' ' + localStorage.getItem(hashedit.tokenName));
        }

        // send the collected data as JSON
        xhr.send(JSON.stringify(data));

        xhr.onloadend = function() {

          location.reload();

        };

      }

    }
function ( ) { var data , xhr ; data = hashedit . retrieveUpdateArray ( ) ; if ( hashedit . saveUrl ) { // construct an HTTP request xhr = new XMLHttpRequest ( ) ; xhr . open ( 'post' , hashedit . saveUrl , true ) ; // set token if ( hashedit . useToken == true ) { xhr . setRequestHeader ( hashedit . authHeader , hashedit . authHeaderPrefix + ' ' + localStorage . getItem ( hashedit . tokenName ) ) ; } // send the collected data as JSON xhr . send ( JSON . stringify ( data ) ) ; xhr . onloadend = function ( ) { location . reload ( ) ; } ; } }
Saves the content
Saves the content