返回首頁 

Agar Cancer Mod

Add some cancer to Agar and make your eyes bleed

< 脚本Agar Cancer Mod的反馈

提问/评论

发表于:2017-07-09
编辑于:2017-07-09

Whaddaya Think?

// ==UserScript==// @name         Agar Cancer Mod (Tidied)// @namespace    https://greasyfork.org/en/users/46159// @version      1.2// @description  Makes your eyes bleed// @author       Turtle ? Clan & Tom// @license      https://en.wikipedia.org/wiki/Free_and_open-source_software// @match        http://agar.io/*// @grant        none// ==/UserScript==window.addEventListener("load", function() {'use strict';var overrides = ['fill', 'stroke', 'fillRect', 'strokeRect', 'fillText', 'strokeText'];var ctxProto = CanvasRenderingContext2D.prototype;var oldMethods = new Map();for (let prop of overrides) {oldMethods.set(prop, ctxProto[prop]);ctxProto[prop] = function() {var gradient = this.createLinearGradient(0, Math.random() * this.canvas.height, Math.random() * this.canvas.width, this.canvas.height);gradient.addColorStop(0, "hsl(" + ~~(Math.random() * 301) + ", 100%, 50%)");gradient.addColorStop(1, "hsl(" + ~~(Math.random() * 301) + ", 100%, 50%)");this.fillStyle = gradient;this.strokeStyle = gradient;return oldMethods.get(prop).apply(this, arguments);};}var flute = new Audio('https://archive.org/download/cancerstorm_20160728/cancer.ogg');flute.volume = 0.3;flute.loop = true;flute.play();});

发表回复

登录以发表回复。