wiki-plugin-mech 0.1.21 → 0.1.22
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/client/mech.js +17 -1
- package/package.json +1 -1
package/client/mech.js
CHANGED
|
@@ -600,6 +600,21 @@
|
|
|
600
600
|
state.items = items
|
|
601
601
|
}
|
|
602
602
|
|
|
603
|
+
function lineup_emit({elem,command,state}) {
|
|
604
|
+
const items = [...document.querySelectorAll('.page')]
|
|
605
|
+
.map(div => {
|
|
606
|
+
const $page = $(div)
|
|
607
|
+
const page = $page.data('data')
|
|
608
|
+
const site = $page.data('site') || location.host
|
|
609
|
+
const slug = $page.attr('id').split('_')[0]
|
|
610
|
+
const title = page.title || 'Empty'
|
|
611
|
+
const text = page.story[0]?.text||'empty'
|
|
612
|
+
return {type:'reference',site,slug,title,text}
|
|
613
|
+
})
|
|
614
|
+
elem.innerHTML = command + ` ⇒ ${items.length} pages`
|
|
615
|
+
state.items = items
|
|
616
|
+
}
|
|
617
|
+
|
|
603
618
|
|
|
604
619
|
// C A T A L O G
|
|
605
620
|
|
|
@@ -625,7 +640,8 @@
|
|
|
625
640
|
TOGETHER:{emit:together_emit},
|
|
626
641
|
GET: {emit:get_emit},
|
|
627
642
|
DELTA: {emit:delta_emit},
|
|
628
|
-
ROSTER: {emit:roster_emit}
|
|
643
|
+
ROSTER: {emit:roster_emit},
|
|
644
|
+
LINEUP: {emit:lineup_emit}
|
|
629
645
|
}
|
|
630
646
|
|
|
631
647
|
|