1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-04 18:19:38 +02: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) {
// 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
// Convert url to lower case:
// `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
pageHostname = context.pageHostname || '';
var type = typeNameToTypeValue[context.requestType];
var categories = this.categories;
var bucket;

View File

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