您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
ETStats Script for gathering drop information from eternitytower.net, see drops at etstats.com/debug.html
// ==UserScript== // @name ETStats Gathering // @namespace http://tampermonkey.net/ // @version 0.3 // @description ETStats Script for gathering drop information from eternitytower.net, see drops at etstats.com/debug.html // @author You // @match http://eternitytower.net/combat // @match https://eternitytower.net/combat // @grant none // ==/UserScript== (function() { 'use strict'; var msgCount = 0; Meteor.connection._stream.on('message', function (message) { var msg = JSON.parse(message); if(msg.collection == "battles") { if(msg.fields != null && msg.fields.finalTickEvents != null) { if(msgCount >= 25 && msg.fields.win) { ETStatsLog(msg); } msgCount++; } } }); function ETStatsLog(data) { var https = (document.location.protocol == "https:"); var socket = null; if(https) socket = new WebSocket("wss://ws.etstats.com"); else socket = new WebSocket("ws://ws.etstats.com"); socket.addEventListener('open', function (event) { socket.send(JSON.stringify(data)); socket.close(); }); } })();