Last active
January 30, 2017 17:12
-
-
Save cohalz/c382f720812cbe781fe4 to your computer and use it in GitHub Desktop.
マイページにてグルコスフレンドのクレ数を表示するブックマークレット フレンドを選んだあとの画面で使用できます
This file contains hidden or 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
javascript:(function(){var hash=window.location.toString().match(/https:\/\/mypage.groovecoaster.jp\/sp\/#\/.+?\/([^\/]+)/);var xmlHttp=new XMLHttpRequest();xmlHttp.open("GET","https://mypage.groovecoaster.jp/sp/json/friend_music_list.php?hash="+hash[1],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%E5%A4%A7%E4%BD%93"+Math.ceil(sum/3.0)+"%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");})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
使うまでの手順
連絡は@cohalzまで