您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Planets.nu Explosion Ship Name
// ==UserScript== // @name Planets.nu Explosion Ship Name (original client only) // @description Planets.nu Explosion Ship Name // @include http://planets.nu/home // @include http://planets.nu/games/* // @include http://play.planets.nu/* // @include http://*.planets.nu/* // @version 0.4 // @namespace https://greasyfork.org/users/2860 // ==/UserScript== // 0.2 First working version // 0.3 Updated code to play nicely with other mods. // 0.4 Updated to work with new URLs function wrapper () { // wrapper for injection oldDrawExplosions = vgapMap.prototype.drawExplosions; vgapMap.prototype.drawExplosions = function () { oldDrawExplosions.apply(this, arguments); for (var i = 0; i < vgap.messages.length; i++) { var message = vgap.messages[i]; if (message.messagetype == 10) { var attr = { stroke: "#ff00ff", "stroke-width": "2", "stroke-opacity": 0.5 }; var x = message.x; var y = message.y; this.drawText(x+20,y+14, message.body.substr(message.body.indexOf("the name of the ship was:")+"the name of the ship was:".length)); } } }; } //wrapper for injection var script = document.createElement("script"); script.type = "application/javascript"; script.textContent = "(" + wrapper + ")();"; document.body.appendChild(script);