function blockRequests(){
return new Response(
"<!DOCTYPE html><html><head></head><body></body></html>", {
status: 200,
headers: {
'Content-Type': 'text/html'
}
}
);
}
chrome.tabs.query({}, function(res){
var activeTab = res[0].id;
chrome.tabs.update(activeTab, { url: _DATA["pageurl"] }, function() {
chrome.webRequest.onBeforeRequest.addListener(blockRequests,
{urls: ["<all_urls>"]},
["blocking"]
);
});
});