1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-04 16:47:15 +02:00

code review + report more accurately request types in logger

This commit is contained in:
gorhill 2015-06-04 09:37:53 -04:00
parent 5ce0a7dff9
commit 13d229eaa1
3 changed files with 14 additions and 4 deletions

View File

@ -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;
}

View File

@ -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'
},

View File

@ -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,8 +127,14 @@ vAPI.messaging = {
return;
}
// 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);
}
}
};
},