Created
October 31, 2017 08:59
-
-
Save southrop/260639bc0d36d37592661eece44544c3 to your computer and use it in GitHub Desktop.
mobage課金計算スクリプト
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
// http://sp.mbga.jp/_vca_hist?app=12016007 | |
function check(context, page) { | |
$ = context.$; | |
if ($("#more") != null) { | |
context.loadList('_vca_hist?app=12016007&p=' + ++page, document.getElementById('list')); | |
console.log('loaded page ' + page); | |
setTimeout(check.bind(context, context, page), 200); | |
} else { | |
var count = 0; | |
Array.from($("#list").children).map(function (i) { | |
var t = i.innerHTML.match(/\+[0-9]*GC/); | |
if (t != null) { | |
count += parseInt(t[0].substring(1, t[0].length-2)); | |
} | |
}); | |
alert('あなたのグラブルコインでの合計課金額は ' + count + ' GC('+ Math.floor(count * 1.03) + ' 円)です。'); | |
} | |
} | |
check(window, 1); |
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 c(e,n){if($=e.$,null!=$("#more"))e.loadList("_vca_hist?app=12016007&p="+ ++n,document.getElementById("list")),console.log("loaded page "+n),setTimeout(c.bind(e,e,n),200);else{var t=0;Array.from($("#list").children).map(function(e){var n=e.innerHTML.match(/\+[0-9]*GC/);null!=n&&(t+=parseInt(n[0].substring(1,n[0].length-2)))}),alert("あなたのグラブルコインでの合計課金額は "+t+" GC("+Math.floor(1.03*t)+" 円)です。")}}c(window,1); |
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
// http://sp.mbga.jp/_coin_hist | |
function check(context, page) { | |
$ = context.$; | |
if ($("#more") != null) { | |
context.loadList('_coin_hist?p=' + ++page, document.getElementById('list')); | |
console.log('loaded page ' + page); | |
setTimeout(check.bind(context, context, page), 200); | |
} else { | |
var count = 0; | |
Array.from($("#list").children).map(function (i) { | |
var t = i.innerHTML.match(/\-[0-9]*コイン/); | |
var t2 = i.innerHTML.indexOf('グランブルーファンタジー'); | |
if (t != null && t2 != null) { | |
count += parseInt(t[0].substring(1, t[0].length-2)); | |
} | |
}); | |
alert('あなたのグラブルモバコインでの合計課金額は ' + count + ' モバコイン('+ Math.floor(count * 1.03) + ' 円)です。'); | |
} | |
} | |
check(window, 1); |
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 c(e,n){if($=e.$,null!=$("#more"))e.loadList("_coin_hist?p="+ ++n,document.getElementById("list")),console.log("loaded page "+n),setTimeout(c.bind(e,e,n),200);else{var t=0;Array.from($("#list").children).map(function(e){var n=e.innerHTML.match(/\-[0-9]*コイン/),i=e.innerHTML.indexOf("グランブルーファンタジー");null!=n&&-1!=i&&(t+=parseInt(n[0].substring(1,n[0].length-2)))}),alert("あなたのグラブルモバコインでの合計課金額は "+t+" モバコイン("+Math.floor(1.03*t)+" 円)です。")}}c(window,1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment