liftie
Version:
Clean, simple, easy to read, fast ski resort lift status
19 lines (17 loc) • 321 B
JavaScript
const states = {
check: 'open',
clock: 'scheduled',
times: 'closed'
};
export default {
selector: 'h2:contains(LIFT STATUS) + table tr:not(:first-child)',
parse: {
name: 0,
status: {
child: '2/0',
attribute: 'class',
regex: /fa-([a-z]+)-circle/,
fn: s => states[s]
}
}
};