Florr.io Better Map Script!

Press the Tabulator button to show!

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Florr.io Better Map Script!
// @namespace    http://tampermonkey.net/
// @version      2.12
// @description  Press the Tabulator button to show!
// @author       Car Boi
// @match        https://florr.io
// @icon         https://cdn.discordapp.com/attachments/1127185090364059712/1127190407550357575/image.png
// @grant        none
// @license      MIT
// ==/UserScript==

const styleSheet = `
#florrMap {
    display:none;
    position: absolute;
    top: 50%;
    left: 50%;
    max-width: 100vw;
    max-height: 100vh;
    transform: translate(-50%, -50%);
    opacity:1;
    pointer-events: none;
}`

const img = document.createElement("img");
img.src = "https://cdn.discordapp.com/attachments/1127185090364059712/1127190407550357575/image.png";
img.id = "florrMap";
document.body.appendChild(img);
let s = document.createElement('style');
s.type = "text/css";
s.innerHTML = styleSheet;
(document.head || document.documentElement).appendChild(s);

let mapOpen = false;
let opacity = 1;
window.addEventListener('load', function() {
  document.onkeydown = function(evt) {
    evt = evt || window.event;
    if (evt.keyCode == '9' && mapOpen === false) {
   	mapOpen = true;
    document.getElementById("florrMap").style.display = "inline";
    } else if (evt.keyCode == '9' && mapOpen === true) {
    mapOpen = false;
    document.getElementById("florrMap").style.display = "none";
    }

    if (evt.keyCode == 189 && opacity > 0.2) {
    opacity -= 0.1;
    document.getElementById("florrMap").style.opacity = `${opacity}`;
    }
    if (evt.keyCode == 187) {
    opacity += 0.1;
    document.getElementById("florrMap").style.opacity = `${opacity}`;
    }
  };
});