Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: background.js

Issue 29328928: Issue 3170 - Fixed: Sitekey not considered for element collapsing (Closed)
Patch Set: Created Oct. 7, 2015, 5:57 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 339
340 var typeMask = RegExpFilter.typeMap[msg.mediatype]; 340 var typeMask = RegExpFilter.typeMap[msg.mediatype];
341 var documentHost = extractHostFromFrame(sender.frame); 341 var documentHost = extractHostFromFrame(sender.frame);
342 var blocked = false; 342 var blocked = false;
343 343
344 for (var i = 0; i < msg.urls.length; i++) 344 for (var i = 0; i < msg.urls.length; i++)
345 { 345 {
346 var url = new URL(msg.urls[i], msg.baseURL); 346 var url = new URL(msg.urls[i], msg.baseURL);
347 var filter = defaultMatcher.matchesAny( 347 var filter = defaultMatcher.matchesAny(
348 stringifyURL(url), typeMask, 348 stringifyURL(url), typeMask,
349 documentHost, isThirdParty(url, documentHost) 349 documentHost, isThirdParty(url, documentHost),
350 getKey(sender.page, sender.frame)
Sebastian Noack 2015/10/08 04:45:04 Mind getting the key above, outside of the loop?
Thomas Greiner 2015/10/08 12:39:36 Done.
350 ); 351 );
351 352
352 if (filter instanceof BlockingFilter) 353 if (filter instanceof BlockingFilter)
353 { 354 {
354 if (filter.collapse != null) 355 if (filter.collapse != null)
355 { 356 {
356 sendResponse(filter.collapse); 357 sendResponse(filter.collapse);
357 return; 358 return;
358 } 359 }
359 360
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 break; 428 break;
428 } 429 }
429 }); 430 });
430 431
431 // update icon when page changes location 432 // update icon when page changes location
432 ext.pages.onLoading.addListener(function(page) 433 ext.pages.onLoading.addListener(function(page)
433 { 434 {
434 page.sendMessage({type: "clickhide-deactivate"}); 435 page.sendMessage({type: "clickhide-deactivate"});
435 refreshIconAndContextMenu(page); 436 refreshIconAndContextMenu(page);
436 }); 437 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld