Last active
June 29, 2016 12:59
-
-
Save yuzu441/8ae9b810390b96865786239d9e6d3e35 to your computer and use it in GitHub Desktop.
zaim集計-履歴画面で範囲選択とかできるのに集計出ない不思議
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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