Group Map Preview

Fixes U-M previews in groups

  1. // ==UserScript==
  2. // @name Group Map Preview
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Fixes U-M previews in groups
  6. // @author Electro
  7. // @match https://tagpro.koalabeast.com/groups/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13. // Set this to "true" if its still not working for you.
  14. const USE_PROXY = false;
  15.  
  16. setInterval(() => {
  17. if(document.querySelector("[name='map']").innerText.includes("MapId:")){
  18. let mapID = document.querySelector("[name='map']").innerText.replace("MapId:", "").trim();
  19. let link = `http://unfortunate-maps.jukejuice.com/static/thumbs/${mapID}.png`;
  20. if(USE_PROXY) link = `https://parretlabs.xyz:8006/proxy?link=${link}&isBlob=1&type=image/png`;
  21.  
  22. document.querySelector(".responsive.map-preview").setAttribute("src", link);
  23. }
  24. }, 1000);
  25. // Your code here...
  26. })();