Skip to content

Instantly share code, notes, and snippets.

@cohalz
Last active January 30, 2017 17:12
Show Gist options
  • Save cohalz/df5836693e8f44f06052 to your computer and use it in GitHub Desktop.
Save cohalz/df5836693e8f44f06052 to your computer and use it in GitHub Desktop.
マイページにてグルコスの楽曲プレイ回数を表示するブックマークレット
javascript:(function(){var xmlHttp=new XMLHttpRequest();xmlHttp.open("GET","https://mypage.groovecoaster.jp/sp/json/music_list.php",false);xmlHttp.send(null);var data=JSON.parse(xmlHttp.responseText);var play_count_data=data.music_list.map(function(e){return e.play_count;});var sum=play_count_data.reduce(function(a,b){return a+b;});alert("%E6%A5%BD%E6%9B%B2%E3%83%97%E3%83%AC%E3%82%A4%E7%B7%8F%E6%95%B0: "+sum+"\n"+Math.ceil(sum/3)+"%E3%82%AF%E3%83%AC%E3%81%8F%E3%82%89%E3%81%84%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99");})();
@cohalz
Copy link
Author

cohalz commented Jan 30, 2017

使うまでの手順
1 上のjavascript~から();までをコピーする
2. コピーしたものをペーストしてブックマークレットを登録(スマホではiPhoneとAndroidで手順がやや面倒なので調べてください)
3. ログイン後マイページでブックマークレットを起動

連絡は@cohalzまで

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment