Left: | ||
Right: |
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
71 { | 71 { |
72 case "frame": | 72 case "frame": |
73 case "iframe": | 73 case "iframe": |
74 type = "SUBDOCUMENT"; | 74 type = "SUBDOCUMENT"; |
75 eventName = "load"; | 75 eventName = "load"; |
76 break; | 76 break; |
77 case "img": | 77 case "img": |
78 case "input": | 78 case "input": |
79 type = "IMAGE"; | 79 type = "IMAGE"; |
80 break; | 80 break; |
81 case "video": | |
82 case "audio": | |
83 case "source": | |
84 type = "MEDIA"; | |
kzar
2015/03/02 16:56:53
One thought I had was that you could add most of t
Sebastian Noack
2015/03/02 16:59:26
All types handled here are actually distinguishabl
kzar
2015/03/02 17:04:29
So for example I thought you could add ["MEDIA", "
Sebastian Noack
2015/03/02 17:08:49
This won't work, since "video", "audio" and "sourc
| |
85 break; | |
81 case "object": | 86 case "object": |
82 case "embed": | 87 case "embed": |
83 type = "OBJECT"; | 88 type = "OBJECT"; |
84 break; | 89 break; |
85 case "script": | 90 case "script": |
86 type = "SCRIPT"; | 91 type = "SCRIPT"; |
87 break; | 92 break; |
88 case "link": | 93 case "link": |
89 if (/\bstylesheet\b/i.test(event.target.rel)) | 94 if (/\bstylesheet\b/i.test(event.target.rel)) |
90 type = "STYLESHEET"; | 95 type = "STYLESHEET"; |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
428 }); | 433 }); |
429 | 434 |
430 | 435 |
431 /* Detecting extension reload/disable/uninstall (not supported on Safari) */ | 436 /* Detecting extension reload/disable/uninstall (not supported on Safari) */ |
432 | 437 |
433 ext.onExtensionUnloaded = { | 438 ext.onExtensionUnloaded = { |
434 addListener: function() {}, | 439 addListener: function() {}, |
435 removeListener: function() {} | 440 removeListener: function() {} |
436 }; | 441 }; |
437 })(); | 442 })(); |
OLD | NEW |