Skip to content

Instantly share code, notes, and snippets.

@yuzu441
Last active June 29, 2016 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuzu441/8ae9b810390b96865786239d9e6d3e35 to your computer and use it in GitHub Desktop.
Save yuzu441/8ae9b810390b96865786239d9e6d3e35 to your computer and use it in GitHub Desktop.
zaim集計-履歴画面で範囲選択とかできるのに集計出ない不思議
(function(){
const prices = document.querySelectorAll(".list tr:not(:first-child) .price a");
sumPrice = Array.prototype.reduce.call(prices, function(a, b) {
const priceText = b.innerText;
return a + parseInt(priceText.replace(/¥|,/g,""));
},0);
alert("合計: " + sumPrice);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment