Add some cancer to Agar and make your eyes bleed
< Spätná väzba na Agar Cancer Mod
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(); });
Aby ste mohli pridať odpoveď, prihláste sa.
Whaddaya Think?