デバッグコードを組み込んだサンプルコードを以下に示します。
<!DOCTYPE html>
・・・
<body>
・・・
<button id="join" onclick="clientinfo()">Remote Debug</button>
<script src="/socket.io/socket.io.js"></script>
<script type="text/javascript" src="imdebug.js"></script>
<script>
function clientinfo(){
//実行ファイルパス
console.log("実行ファイルパス:" + location.pathname);
//ブラウザバージョン
console.log("ブラウザバージョン:" + navigator.appVersion );
//言語
console.log("言語:" + navigator.language );
//ユーザーエージェント
console.log("ユーザーエージェント:" + navigator.userAgent);
//スクリーンサイズ(幅)
console.log("スクリーンサイズ(幅):" + screen.width);
//スクリーンサイズ(縦)
console.log("スクリーンサイズ(縦):" + screen.height);
//スクリーン色深度
console.log("スクリーン色深度:" + screen.colorDepth);
}
</script>
</body>
</html>