Skip to content

Commit 68dcf08

Browse files
action json on hover
1 parent 00ece05 commit 68dcf08

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

pages/better-admin-with-mechs/phantom-assets.html

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
async function more() {
1616
button.disabled = true
17-
const todo = sitemap.slice(start,start+=50)
17+
const todo = sitemap.slice(start,start+=100)
1818
await scan(todo)
19-
button.innerText = `more of ${sitemap.length-start}`
19+
button.innerText = `more of ${Math.max(sitemap.length-start,0)}`
2020
button.disabled = false
2121
}
2222

@@ -30,19 +30,20 @@
3030
)
3131
}
3232

33-
// jq '.journal|group_by(.id)|.[]|select(any(.type=="remove") and any(.item.type=="assets"))
33+
// jq '.journal|group_by(.id)|.[]|select(any(.type=="remove") and any(.item.type=="assets"))
3434

35-
function check(infox,page) {
36-
const groups = Object.groupBy(page.journal, info => info.id)
37-
const want = Object.entries(groups).filter(([id,actions]) =>
35+
function check(info,page) {
36+
const groups = Object.groupBy(page.journal, action => action.id)
37+
const wanted = Object.entries(groups).filter(([id,actions]) =>
3838
actions.some(action => action.type == "remove") &&
3939
actions.some(action => action.item?.type == "assets"))
40-
if(want.length>0) {
41-
result.innerHTML += `${infox.title} has\n`
42-
for (const wanted of want) {
43-
console.log(infox.title, wanted[0], wanted[1])
44-
result.innerHTML += ` ${wanted[0]} ${wanted[1].map(action => action.type).join(" ")}\n`
45-
}
40+
if(wanted.length>0) {
41+
result.innerHTML += `${info.title}\n`
42+
wanted.forEach(([id,actions]) => {
43+
result.innerHTML += ` ${id} ${actions
44+
.map(action => `<span title="${JSON.stringify(action,null,2).replaceAll(/"/g,"'")}">${action.type}</span>`)
45+
.join(" ")}\n`
46+
})
4647
}
4748
}
4849

0 commit comments

Comments
 (0)