UNPKG

558 BJavaScriptView Raw
1'use strict';
2
3exports.type = 'perItem';
4
5exports.active = false;
6
7exports.description = 'removes raster images (disabled by default)';
8
9/**
10 * Remove raster images references in <image>.
11 *
12 * @see https://bugs.webkit.org/show_bug.cgi?id=63548
13 *
14 * @param {Object} item current iteration item
15 * @return {Boolean} if false, item will be filtered out
16 *
17 * @author Kir Belevich
18 */
19exports.fn = function(item) {
20
21 if (
22 item.isElem('image') &&
23 item.hasAttrLocal('href', /(\.|image\/)(jpg|png|gif)/)
24 ) {
25 return false;
26 }
27
28};