cec-nuxt-lib 0.7.5 → 0.7.6
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
|
@@ -132,10 +132,15 @@ onMounted(() => {
|
|
|
132
132
|
if (hash) {
|
|
133
133
|
hash = hash.toLowerCase().replace(/^#/, '').replace(/_/g, ' ');
|
|
134
134
|
let l = Array.from(document.getElementsByTagName('LABEL')).filter((e) =>
|
|
135
|
-
e.innerText.toLowerCase().
|
|
135
|
+
e.innerText.toLowerCase().startsWith(hash)
|
|
136
136
|
);
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
let accs = l.filter(
|
|
138
|
+
(e) =>
|
|
139
|
+
e.parentNode.tagName === 'SECTION' ||
|
|
140
|
+
e.parentNode.tagName === 'TEMPLATE'
|
|
141
|
+
);
|
|
142
|
+
if (accs.length) {
|
|
143
|
+
let el = accs[0].previousElementSibling;
|
|
139
144
|
if (el.tagName === 'INPUT') {
|
|
140
145
|
el.checked = true;
|
|
141
146
|
el.scrollIntoView();
|
|
@@ -146,7 +151,7 @@ onMounted(() => {
|
|
|
146
151
|
let h3s = Array.from(document.getElementsByTagName('H3')).filter((e) =>
|
|
147
152
|
e.innerHTML.toLowerCase().includes(hash)
|
|
148
153
|
);
|
|
149
|
-
if (h3s) {
|
|
154
|
+
if (h3s.length) {
|
|
150
155
|
let parent = h3s[0].parentNode;
|
|
151
156
|
if (parent.tagName === 'ARTICLE') {
|
|
152
157
|
let el = parent.previousElementSibling;
|
package/package.json
CHANGED