script.jsscrapbox.PopupMenu.addButton({
title: function (text) {
var times = text.match(/[+-]?[0-9]+(\.[0-9]*)?([eE][+-]?[0-9]+)?/g)
if(!text || !times) {return}
times = times.map(x => Number(x))
var sum = times.reduce((p,c)=>{return p+c});
return `sum: ${sum}`
},
onClick: () => null
})