Created
September 13, 2019 10:59
-
-
Save riatw/05efb09dc7271a0ca0e258a1d6996e05 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
var array = $("body").text().match(/(消費税抜き .*?円)/gm); | |
var stash = []; | |
if ( array.length > 0 ) { | |
for( var i = 0; i < array.length; i++ ){ | |
stash.push( Math.floor( array[i].replace(/(消費税抜き (.*?)円)/,"$1").replace(/,/gm,"") * 1.1 ).toLocaleString() ); | |
} | |
} | |
console.log(stash.join("\n")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment