blob: 2e56fb53085b6647d1f1a2f408b0eccf60f2c0a5 (
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 trafficData = '';
trafficData += '===\n';
trafficData += 'Client Server Traffic\n';
trafficData += '===\n';
trafficData += JSON.stringify(trafficRecord, null, 2);
trafficData += '\n';
trafficDump.textContent = trafficData;
}
})();
|