filter.js 925 B

1234567891011121314151617181920212223242526272829
  1. (function() {
  2. var Declaration, Filter,
  3. __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
  4. __hasProp = {}.hasOwnProperty;
  5. Declaration = require('../declaration');
  6. Filter = (function(_super) {
  7. __extends(Filter, _super);
  8. function Filter() {
  9. return Filter.__super__.constructor.apply(this, arguments);
  10. }
  11. Filter.names = ['filter'];
  12. Filter.prototype.check = function(decl) {
  13. var v;
  14. v = decl.value;
  15. return v.toLowerCase().indexOf('alpha(') === -1 && v.indexOf('DXImageTransform.Microsoft') === -1 && v.indexOf('data:image/svg+xml') === -1;
  16. };
  17. return Filter;
  18. })(Declaration);
  19. module.exports = Filter;
  20. }).call(this);