diff --git a/background.js b/background.js index f3f5d34..db2374c 100644 --- a/background.js +++ b/background.js @@ -42,7 +42,7 @@ chrome.debugger.onEvent.addListener(function (source, method, params){ if (params.resourceType == 'Document'){ var replbody = btoa(unescape(encodeURIComponent(html_script_replacer(respboby, replacer, params.request.url)))) } fillfunc(replbody) } catch(e){ - send_error_info_to_front(e.stack, currtab.tabId) + send_error_info_to_front(e.stack, currtab.tabId, params.request.url) fillfunc(result.body) } }) return } diff --git a/tools/error_front.js b/tools/error_front.js index 4bb6a13..05dc399 100644 --- a/tools/error_front.js +++ b/tools/error_front.js @@ -1,5 +1,5 @@ -function send_error_info_to_front(e, tid){ +function send_error_info_to_front(e, tid, url){ chrome.tabs.query({active: true, currentWindow: true}, function(tabs){ - chrome.tabs.sendMessage(tid, {action: {type:'error', info: e}}, function(response) {}); + chrome.tabs.sendMessage(tid, {action: {type:'error', info: url + '\n' + e}}, function(response) {}); }); } \ No newline at end of file