This commit is contained in:
cilame 2021-10-23 16:53:52 +08:00
parent 304873cb8b
commit dff299ba2e
2 changed files with 3 additions and 3 deletions

View File

@ -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)))) } if (params.resourceType == 'Document'){ var replbody = btoa(unescape(encodeURIComponent(html_script_replacer(respboby, replacer, params.request.url)))) }
fillfunc(replbody) } fillfunc(replbody) }
catch(e){ 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) } fillfunc(result.body) }
}) })
return } return }

View File

@ -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.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) {});
}); });
} }