LEFT | RIGHT |
(no file at all) | |
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-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1353 } | 1353 } |
1354 exports.ElemHideBase = ElemHideBase; | 1354 exports.ElemHideBase = ElemHideBase; |
1355 | 1355 |
1356 ElemHideBase.prototype = extend(ContentFilter, { | 1356 ElemHideBase.prototype = extend(ContentFilter, { |
1357 /** | 1357 /** |
1358 * CSS selector for the HTML elements that should be hidden | 1358 * CSS selector for the HTML elements that should be hidden |
1359 * @type {string} | 1359 * @type {string} |
1360 */ | 1360 */ |
1361 get selector() | 1361 get selector() |
1362 { | 1362 { |
1363 // Braces are being escaped to prevent CSS rule injection. | 1363 return this.body; |
1364 return this.body.replace("{", "\\7B ").replace("}", "\\7D "); | |
1365 } | 1364 } |
1366 }); | 1365 }); |
1367 | 1366 |
1368 /** | 1367 /** |
1369 * Class for element hiding filters | 1368 * Class for element hiding filters |
1370 * @param {string} text see {@link Filter Filter()} | 1369 * @param {string} text see {@link Filter Filter()} |
1371 * @param {string} [domains] see {@link ElemHideBase ElemHideBase()} | 1370 * @param {string} [domains] see {@link ElemHideBase ElemHideBase()} |
1372 * @param {string} selector see {@link ElemHideBase ElemHideBase()} | 1371 * @param {string} selector see {@link ElemHideBase ElemHideBase()} |
1373 * @constructor | 1372 * @constructor |
1374 * @augments ElemHideBase | 1373 * @augments ElemHideBase |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1438 | 1437 |
1439 /** | 1438 /** |
1440 * Script that should be executed | 1439 * Script that should be executed |
1441 * @type {string} | 1440 * @type {string} |
1442 */ | 1441 */ |
1443 get script() | 1442 get script() |
1444 { | 1443 { |
1445 return this.body; | 1444 return this.body; |
1446 } | 1445 } |
1447 }); | 1446 }); |
LEFT | RIGHT |