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