@spalger/kibana
Version:
Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elastic
24 lines (19 loc) • 587 B
JavaScript
define(function (require) {
var _ = require('lodash');
/**
* just a place to put feature detection checks
*/
return {
cssFilters: (function () {
var e = document.createElement('img');
var rules = ['webkitFilter', 'mozFilter', 'msFilter', 'filter'];
var test = 'grayscale(1)';
rules.forEach(function (rule) { e.style[rule] = test; });
document.body.appendChild(e);
var styles = window.getComputedStyle(e);
var can = _(styles).pick(rules).includes(test);
document.body.removeChild(e);
return can;
}())
};
});