B2G/gaia/apps/homescreen/everything.me/js/api/DoATAPI.js
// add the saved params from earlier responses to the event's data
add the saved params from earlier responses to the event's data
add the saved params from earlier responses to the event ' s data
function addSavedParams(options) {
        var events = options.data;
        if (events) {
            try {
                events = JSON.parse(events);
            } catch(ex) {
                events = null;
            }
            if (events && typeof events === "object") {
                for (var i=0,e; e=events[i++];) {
                    var savedValue = savedParamsToPass[e.userEvent];
                    if (savedValue) {
                        e[PARAM_TO_PASS_FROM_REQUEST_TO_STATS] = savedValue;
                    }
                }
                options.data = JSON.stringify(events);
            }
        }
        return options;
    }
function addSavedParams ( options ) { var events = options . data ; if ( events ) { try { events = JSON . parse ( events ) ; } catch ( ex ) { events = null ; } if ( events && typeof events === "object" ) { for ( var i = 0 , e ; e = events [ i ++ ] ; ) { var savedValue = savedParamsToPass [ e . userEvent ] ; if ( savedValue ) { e [ PARAM_TO_PASS_FROM_REQUEST_TO_STATS ] = savedValue ; } } options . data = JSON . stringify ( events ) ; } } return options ; }
add the saved params from earlier responses to the event's data
add the saved params from earlier responses to the event ' s data