Diep Custom Background

Custom backgrounds for diep.io.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Diep Custom Background
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Custom backgrounds for diep.io.
// @author       Adasba
// @license      MIT
// @match        http://*diep.io/*
// @match        https://*diep.io/*
// @match        *://diep.io/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    var img = document.createElement('img');
    img.style = "z-index:-1;position:fixed;top:0px;left:0px";
    document.getElementsByTagName('body')[0].appendChild(img);



    var shaderButton = document.createElement('button');
    document.getElementsByTagName('body')[0].appendChild(shaderButton);
    var bg = true;
    shaderButton.style = "position:absolute; top:0px; left:0px;";
    shaderButton.innerHTML = "BG on/off";
    shaderButton.onclick = function() {
        bg = !bg;
        input.set_convar('ren_background', bg);
    }
    
    function loop1() {
        img.src = "https://upload.wikimedia.org/wikipedia/commons/8/80/Backgorund.gif";
    }
    setInterval(loop1, 1000);
})();