Created
June 28, 2020 13:57
-
-
Save ara-ta3/414919a2b780bf049634712eb1763581 to your computer and use it in GitHub Desktop.
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
// https://hyperwiki.jp/acnh/kabu-tool/ | |
// Array.from(document.querySelectorAll("#output tr")).filter((tr) => tr.className === '').map((tr) => {return { p: parseFloat(tr.childNodes[1].innerText.replace("%", "")), max: parseInt(tr.childNodes[16].innerText), min: parseInt(tr.childNodes[15].innerText)}}).map((x) => (x.max+x.min)/2 * (x.p / 100)).reduce((E, en) => E + en, 0) | |
Array.from(document.querySelectorAll("#output tr")).filter((tr) => tr.className === '').map((tr) => { | |
return { | |
p: parseFloat(tr.childNodes[1].innerText.replace("%", "")), | |
max: parseInt(tr.childNodes[16].innerText), | |
min: parseInt(tr.childNodes[15].innerText) | |
} | |
}).map((x) => (x.max + x.min) / 2 * (x.p / 100)).reduce((E, en) => E + en, 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment