Kill Distance Extension (Public)

Allows viewing of the distance between two players when a kill takes place

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Kill Distance Extension (Public)
// @description  Allows viewing of the distance between two players when a kill takes place
// @icon         https://www.google.com/s2/favicons?domain=shellshock.io
// @match        *://shellshock.io/*
// @run-at       document-start
// @author       Agent Adam
// @grant        none
// @namespace    none
// @version      2.1
// ==/UserScript==
 
window.XMLHttpRequest = class extends window.XMLHttpRequest {
    constructor() {
        super(...arguments)
    }

    open() {
        (arguments[1]?.includes('shellshock.js') && (this.m = !0), super.open(...arguments))
    }

    get response() {
        if (this.m) {
            let x = super.response

            let y = /(function [A-z]{2}\(([A-z]),([A-z])\)\{var [A-z]=\[.*"<\/span>")(;)/

            if (x.match(y)) return x.replace(y, `$1+'<span style="color:#4A58FF"> ['+('0'+Math.floor(Math.length3($2.x-$3.x,$2.y-$3.y,$2.z-$3.z)*2)).slice(-2)+"m]</span>"$4`)
        }; return super.response
    }
}