Group Map Preview

Fixes U-M previews in groups

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Group Map Preview
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Fixes U-M previews in groups
// @author       Electro
// @match        https://tagpro.koalabeast.com/groups/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    // Set this to "true" if its still not working for you.
    const USE_PROXY = false;

    setInterval(() => {
        if(document.querySelector("[name='map']").innerText.includes("MapId:")){
            let mapID = document.querySelector("[name='map']").innerText.replace("MapId:", "").trim();
            let link = `http://unfortunate-maps.jukejuice.com/static/thumbs/${mapID}.png`;
            if(USE_PROXY) link = `https://parretlabs.xyz:8006/proxy?link=${link}&isBlob=1&type=image/png`;

            document.querySelector(".responsive.map-preview").setAttribute("src", link);
        }
    }, 1000);
    // Your code here...
})();