cec-nuxt-lib 0.6.7 → 0.6.9
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.
package/dist/module.json
CHANGED
|
@@ -116,35 +116,54 @@ onMounted(() => {
|
|
|
116
116
|
} catch (ignore) {
|
|
117
117
|
console.log('No reachdeck.');
|
|
118
118
|
}
|
|
119
|
-
});
|
|
120
119
|
|
|
121
|
-
// Make accordions spring open if there is a hash (looks for an H3)
|
|
122
|
-
let
|
|
123
|
-
if (
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
el.scrollIntoView();
|
|
120
|
+
// Make accordions spring open if there is a hash (looks for an H3)
|
|
121
|
+
let accordions = document.getElementsByClassName('access-acc-container');
|
|
122
|
+
if (accordions.length) {
|
|
123
|
+
let hash = window.location.hash;
|
|
124
|
+
let found = false;
|
|
125
|
+
if (hash) {
|
|
126
|
+
hash = hash.toLowerCase().replace(/^#/, '').replace(/_/g, ' ');
|
|
127
|
+
Array.from(document.getElementsByTagName('LABEL'))
|
|
128
|
+
.filter((e) => e.innerHTML.toLowerCase().includes(hash))
|
|
129
|
+
.forEach((l, i) => {
|
|
130
|
+
if (l.parentNode.tagName === 'SECTION') {
|
|
131
|
+
let el = l.previousElementSibling;
|
|
132
|
+
if (el.tagName === 'INPUT') {
|
|
133
|
+
el.checked = true;
|
|
134
|
+
if (!i) {
|
|
135
|
+
el.scrollIntoView();
|
|
136
|
+
found = true;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
141
139
|
}
|
|
142
|
-
}
|
|
140
|
+
});
|
|
141
|
+
if (!found) {
|
|
142
|
+
Array.from(document.getElementsByTagName('H3'))
|
|
143
|
+
.filter((e) => e.innerHTML.toLowerCase().includes(hash))
|
|
144
|
+
.forEach((h3, i) => {
|
|
145
|
+
let parent = h3.parentNode;
|
|
146
|
+
if (parent.tagName === 'ARTICLE') {
|
|
147
|
+
let el = parent.previousElementSibling;
|
|
148
|
+
let input =
|
|
149
|
+
el.tagName === 'LABEL'
|
|
150
|
+
? el.control
|
|
151
|
+
: el.tagName === 'INPUT'
|
|
152
|
+
? el
|
|
153
|
+
: undefined;
|
|
154
|
+
if (input) {
|
|
155
|
+
input.checked = true;
|
|
156
|
+
if (!i) {
|
|
157
|
+
el.scrollIntoView();
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
});
|
|
143
162
|
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
146
165
|
|
|
147
|
-
// Canvas stuff
|
|
166
|
+
// Canvas stuff
|
|
148
167
|
const getQuInfo = (b) => {
|
|
149
168
|
let temp = b.id.split('_');
|
|
150
169
|
let id = temp[3];
|
package/package.json
CHANGED