// 浏览器地址栏输入chrome://dino
// 控制台输入 以便查看对象
(function () {
const keys = [];
const ifeame = document.createElement('iframe');
ifeame.onload = function () {
const iframeKeys = Object.keys(ifeame.contentWindow);
Object.keys(window).forEach(function (key) {
if (!(iframeKeys.includes(key))) {
keys.push(key);
}
})
console.log(keys);
}
ifeame.src = 'about:blank';
document.body.appendChild(ifeame);
})();
// 查看类型
typeof window.Runner
// 查看构造函数
Runner.prototype
// 覆盖游戏结束函数,达到无敌
Runner.prototype.gameOver=function(){}
// 设置速度
Runner.instance_.setSpeed(100)