1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
6 var trafficToTextButton = document.getElementById('traffic-to-text');
7 var trafficDump = document.getElementById('traffic-dump');
8 trafficToTextButton.addEventListener('click', function(event) {
9 chrome.sync.getClientServerTraffic(printData);
12 function printData(trafficRecord) {
14 trafficData += '===\n';
15 trafficData += 'Client Server Traffic\n';
16 trafficData += '===\n';
17 trafficData += JSON.stringify(trafficRecord, null, 2);
20 trafficDump.textContent = trafficData;