R3dL3ad3r / Pokemon Map

// ==UserScript==
// @name         Pokemon Map
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Minor Visual Fixes
// @author       Montaxx
// @match        https://skiplagged.com/pokemon/*
// @grant        none
// @require      https://code.jquery.com/jquery-3.1.0.min.js
// ==/UserScript==

$(document).ready(function(){
    window.setInterval(checkForPokemonDiv, 1000);

    function checkForPokemonDiv(){
        $(".gm-style-iw").each(function(){
            var pokediv = $(this).find(">:first-child").find(">:first-child").find(">:first-child").find(".right");
            var coordinates = pokediv.html().split("https:\/\/www.google.com\/maps\/dir\/")[1].split("\" target=\"_blank\"")[0];
            pokediv.find(">:nth-child(3)").find(">:first-child").html(coordinates.split("\/")[1]);
        });
    }
});