nodebb-theme-harmony 1.0.0-beta.58 → 1.0.0-beta.59
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/package.json +1 -1
- package/public/harmony.js +8 -6
package/package.json
CHANGED
package/public/harmony.js
CHANGED
|
@@ -236,13 +236,15 @@ $(document).ready(function () {
|
|
|
236
236
|
function fixPlaceholders() {
|
|
237
237
|
const count = parseInt(document.querySelector('[component="notifications/count"]').innerText, 10);
|
|
238
238
|
if (count > 1) {
|
|
239
|
-
const
|
|
240
|
-
|
|
239
|
+
const notifListEls = document.querySelectorAll('[component="notifications/list"]');
|
|
240
|
+
notifListEls.forEach((notifListEl) => {
|
|
241
|
+
const placeholder = notifListEl.querySelector('li');
|
|
241
242
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
243
|
+
for (let x = 0; x < count - 1; x++) {
|
|
244
|
+
const cloneEl = placeholder.cloneNode(true);
|
|
245
|
+
notifListEl.insertBefore(cloneEl, placeholder);
|
|
246
|
+
}
|
|
247
|
+
});
|
|
246
248
|
}
|
|
247
249
|
}
|
|
248
250
|
});
|