1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-07 11:22:38 +01:00
This commit is contained in:
gorhill 2015-01-17 07:53:19 -05:00
parent 3ab9aa46b0
commit 94453ed878
2 changed files with 9 additions and 1 deletions

View File

@ -1812,6 +1812,13 @@ FilterContainer.prototype.matchStringExactType = function(context, requestURL, r
/******************************************************************************/ /******************************************************************************/
FilterContainer.prototype.matchString = function(context) { FilterContainer.prototype.matchString = function(context) {
// https://github.com/gorhill/uBlock/issues/519
// Use exact type match for anything beyond `other`
var type = typeNameToTypeValue[context.requestType];
if ( type > 8 << 4 ) {
return this.matchStringExactType(context, context.requestURL, context.requestType);
}
// https://github.com/gorhill/httpswitchboard/issues/239 // https://github.com/gorhill/httpswitchboard/issues/239
// Convert url to lower case: // Convert url to lower case:
// `match-case` option not supported, but then, I saw only one // `match-case` option not supported, but then, I saw only one
@ -1845,7 +1852,6 @@ FilterContainer.prototype.matchString = function(context) {
// This will be used by hostname-based filters // This will be used by hostname-based filters
pageHostname = context.pageHostname || ''; pageHostname = context.pageHostname || '';
var type = typeNameToTypeValue[context.requestType];
var categories = this.categories; var categories = this.categories;
var bucket; var bucket;

View File

@ -270,6 +270,8 @@ var onHeadersReceived = function(details) {
µb.localSettings.blockedRequestCount++; µb.localSettings.blockedRequestCount++;
µb.updateBadgeAsync(tabId); µb.updateBadgeAsync(tabId);
pageStore.logBuffer.writeOne(pageStore, result);
details.responseHeaders.push({ details.responseHeaders.push({
'name': 'Content-Security-Policy', 'name': 'Content-Security-Policy',
'value': "script-src 'unsafe-eval' *" 'value': "script-src 'unsafe-eval' *"