| OLD | NEW |
| 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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 | 388 |
| 389 // If image maps are used mouse events occur for the <area> element. | 389 // If image maps are used mouse events occur for the <area> element. |
| 390 // But we have to block the image associated with the <map> element. | 390 // But we have to block the image associated with the <map> element. |
| 391 else if (element.localName == "map") | 391 else if (element.localName == "map") |
| 392 { | 392 { |
| 393 var images = document.querySelectorAll("img[usemap]"); | 393 var images = document.querySelectorAll("img[usemap]"); |
| 394 var image = null; | 394 var image = null; |
| 395 | 395 |
| 396 for (var i = 0; i < images.length; i++) | 396 for (var i = 0; i < images.length; i++) |
| 397 { | 397 { |
| 398 var usemap = image.getAttribute("usemap"); | 398 var usemap = images[i].getAttribute("usemap"); |
| 399 var index = usemap.indexOf("#"); | 399 var index = usemap.indexOf("#"); |
| 400 | 400 |
| 401 if (index != -1 && usemap.substr(index + 1) == element.name) | 401 if (index != -1 && usemap.substr(index + 1) == element.name) |
| 402 { | 402 { |
| 403 image = images[i]; | 403 image = images[i]; |
| 404 break; | 404 break; |
| 405 } | 405 } |
| 406 } | 406 } |
| 407 | 407 |
| 408 element = image; | 408 element = image; |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 lastRightClickEventValid = false; | 730 lastRightClickEventValid = false; |
| 731 else | 731 else |
| 732 lastRightClickEvent = null; | 732 lastRightClickEvent = null; |
| 733 break; | 733 break; |
| 734 } | 734 } |
| 735 }); | 735 }); |
| 736 | 736 |
| 737 if (window == window.top) | 737 if (window == window.top) |
| 738 ext.backgroundPage.sendMessage({type: "report-html-page"}); | 738 ext.backgroundPage.sendMessage({type: "report-html-page"}); |
| 739 } | 739 } |
| OLD | NEW |