mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 01:02:08 +01:00
code review + report more accurately request types in logger
This commit is contained in:
parent
5ce0a7dff9
commit
13d229eaa1
3 changed files with 14 additions and 4 deletions
|
@ -223,7 +223,6 @@ const contentObserver = {
|
|||
} else {
|
||||
// Sandbox appears void.
|
||||
// I've seen this happens, need to investigate why.
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -325,6 +324,7 @@ const contentObserver = {
|
|||
lss(this.contentBaseURI + 'vapi-client.js', sandbox);
|
||||
lss(this.contentBaseURI + 'contentscript-start.js', sandbox);
|
||||
} catch (ex) {
|
||||
//console.exception(ex.msg, ex.stack);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -791,7 +791,7 @@ var tabWatcher = (function() {
|
|||
}
|
||||
var tabId = browserToTabIdMap.get(browser);
|
||||
if ( tabId === undefined ) {
|
||||
tabId = 't' + tabIdGenerator++;
|
||||
tabId = '' + tabIdGenerator++;
|
||||
browserToTabIdMap.set(browser, tabId);
|
||||
tabIdToBrowserMap.set(tabId, browser);
|
||||
}
|
||||
|
@ -1212,9 +1212,13 @@ var httpObserver = {
|
|||
5: 'object',
|
||||
6: 'main_frame',
|
||||
7: 'sub_frame',
|
||||
10: 'ping',
|
||||
11: 'xmlhttprequest',
|
||||
12: 'object',
|
||||
14: 'font',
|
||||
15: 'media',
|
||||
16: 'websocket',
|
||||
19: 'beacon',
|
||||
21: 'image'
|
||||
},
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
var vAPI = self.vAPI = self.vAPI || {};
|
||||
vAPI.firefox = true;
|
||||
vAPI.sessionId = String.fromCharCode(Date.now() % 25 + 97) +
|
||||
vAPI.sessionId = String.fromCharCode(Date.now() % 26 + 97) +
|
||||
Math.random().toString(36).slice(2);
|
||||
|
||||
/******************************************************************************/
|
||||
|
@ -127,7 +127,13 @@ vAPI.messaging = {
|
|||
return;
|
||||
}
|
||||
|
||||
self.injectScript(details.file);
|
||||
// TODO: investigate why this happens, and if this happens
|
||||
// legitimately (content scripts not injected I suspect, so
|
||||
// that would make this legitimate).
|
||||
// Case: open popup UI from icon in uBlock's logger
|
||||
if ( typeof self.injectScript === 'function' ) {
|
||||
self.injectScript(details.file);
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue