Skip to content

Instantly share code, notes, and snippets.

@cohalz
Last active July 13, 2017 14:30
Show Gist options
  • Save cohalz/f234ac6dd44782c0b6b17cc4d93367fd to your computer and use it in GitHub Desktop.
Save cohalz/f234ac6dd44782c0b6b17cc4d93367fd to your computer and use it in GitHub Desktop.
グルコスの今月の月間ランキングを確認するブックマークレット(平均スコア付き)
javascript:(function(){var xmlHttp=new XMLHttpRequest();xmlHttp.open("GET","https://mypage.groovecoaster.jp/sp/json/player_data.php",false);xmlHttp.send(null);var player_data=JSON.parse(xmlHttp.responseText);var player_name=player_data.player_data.player_name;var index=0;var date=new Date();var now=date.getFullYear()+""+("0"+(date.getMonth()+1)).slice(-2);var flag=false;var firstScore=0;var myScore=0;while(!flag&&index<10){xmlHttp.open("GET","https://mypage.groovecoaster.jp/sp/json/monthly_ranking.php?id=0&page="+index,false);xmlHttp.send(null);if(xmlHttp.responseText[0]=='f'){alert(now.slice(0,4)+"%E5%B9%B4"+now.slice(4)+"%E6%9C%88%E3%81%AE%E6%9C%88%E9%96%93%E3%83%A9%E3%83%B3%E3%82%AD%E3%83%B3%E3%82%B0%E3%81%AF%E3%81%BE%E3%81%A0%E5%85%AC%E9%96%8B%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%81%BE%E3%81%9B%E3%82%93")};var data=JSON.parse(xmlHttp.responseText);if(index==0){firstScore=data.rank[0].score;}for(var i=0;i<data.rank.length;i++){if(data.rank[i].player_name===player_name){myScore=data.rank[i].score;alert(player_name+"%E3%81%95%E3%82%93%E3%81%AE"+now.slice(0,4)+"%E5%B9%B4"+now.slice(4)+"%E6%9C%88%E3%81%AE%E6%9C%88%E9%96%93%E3%83%A9%E3%83%B3%E3%82%AD%E3%83%B3%E3%82%B0%E3%81%AF"+data.rank[i].rank+"%E4%BD%8D%E3%81%A7%E3%81%99\n"+"%E5%B9%B3%E5%9D%87%E3%82%B9%E3%82%B3%E3%82%A2: "+Math.floor(myScore/firstScore*1000000));flag=true;break;}}index++;};})();
@cohalz
Copy link
Author

cohalz commented Apr 3, 2017

使うまでの手順

  1. このページをブックマークする
    2 上のjavascript~から();までをコピーする
  2. 上で登録したブックマークを編集してコピーしたものを貼り付けて置き換える
  3. ログイン後マイページでブックマークレットを起動
    連絡は@cohalzまで

【注意事項】グルコスサーバの負荷対策のため,1000位以内のランキングまでしか探さないようになっています

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