1 // Copyright (c) 2011 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.
5 chrome.extension.onRequest.addListener(
6 function(url, sender, sendResponse) {
7 var req = new XMLHttpRequest();
8 console.log('Requesting url: ' + url);
9 req.open('GET', url, true);
11 req.onload = function() {
15 'text': req.responseText
18 req.onerror = function() {
22 'text': req.responseText
29 chrome.extension.sendRequest('injected');