liftie 4.0.3 → 4.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
selector: '
|
|
2
|
+
selector: '.uk-h2:contains(Lift Status) + .fs-table tbody tr',
|
|
3
3
|
parse: {
|
|
4
|
-
name:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
name: {
|
|
5
|
+
child: '0/0',
|
|
6
|
+
regex: /(.*?)(\s+\d|$)/s
|
|
7
|
+
},
|
|
8
|
+
status: row => {
|
|
9
|
+
const children = row.children.filter(c => c.type === 'tag');
|
|
10
|
+
const openCol = children[1];
|
|
11
|
+
const closedCol = children[2]; // Might be undefined in old 2-col layout
|
|
12
|
+
|
|
13
|
+
// Helper for new site structure (uikit classes)
|
|
14
|
+
const hasClass = (node, className) => {
|
|
15
|
+
if (node?.attribs?.class?.includes(className)) return true;
|
|
16
|
+
if (node?.children) return node.children.some(c => hasClass(c, className));
|
|
17
|
+
return false;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// New Logic (uk-text-success / danger inside col 1 or 2)
|
|
21
|
+
if (hasClass(openCol, 'uk-text-success')) return 'open';
|
|
22
|
+
if (hasClass(closedCol, 'uk-text-danger')) return 'closed';
|
|
8
23
|
}
|
|
9
24
|
}
|
|
10
25
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "Burke Mountain",
|
|
3
3
|
"url": {
|
|
4
|
-
"host": "
|
|
5
|
-
"pathname": "/
|
|
4
|
+
"host": "https://skiburke.com",
|
|
5
|
+
"pathname": "/the-mountain/weather-conditions"
|
|
6
6
|
},
|
|
7
7
|
"tags": [
|
|
8
8
|
"Vermont",
|