FFNM/dist/ffnm.min.js

30 lines
701 B
JavaScript
Raw Normal View History

2020-06-30 10:43:00 +02:00
//===
// VARIABLES
//===
var EVENTS;
(function (EVENTS) {
EVENTS[EVENTS["i-click"] = 0] = "i-click";
EVENTS[EVENTS["i-scroll-up"] = 1] = "i-scroll-up";
EVENTS[EVENTS["i-scroll-down"] = 2] = "i-scroll-down";
EVENTS[EVENTS["i-hover"] = 3] = "i-hover";
})(EVENTS || (EVENTS = {}));
//===
// FUNCTIONS
//===
function validateSyntax() {
// Check every event
var eventsKeys = Object.keys(EVENTS).filter(function (key) { return !isNaN(Number(EVENTS[key])); });
eventsKeys.forEach(function (event) {
var ddd = document.querySelector("[" + event + "]").length;
console.log(ddd);
});
return true;
}
//===
// LINTER
//===
//===
// INIT
//===
validateSyntax();