Pokemap Addition Patch (skiplagged)

Adding coordinate and a link for trigger pokesniper2 to catch selected pokemon

  1. // ==UserScript==
  2. // @name Pokemap Addition Patch (skiplagged)
  3. // @namespace pokemap addition patch
  4. // @version 0.2
  5. // @description Adding coordinate and a link for trigger pokesniper2 to catch selected pokemon
  6. // @author BewbsMastery
  7. // @match https://skiplagged.com/*
  8. // @grant none
  9. // @require https://code.jquery.com/jquery-3.1.0.min.js
  10. // ==/UserScript==
  11. $(function(){
  12. window.setInterval(function(){
  13. var container = $(".gm-style-iw").find(".right");
  14. var coordinates = container.find("p:eq(2)").find(">:first-child").attr("href").split("/")[6];
  15. var pokemonName = container.find(">:first-child").find(">:first-child").text();
  16. var url = "pokesniper2://"+ pokemonName +"/"+ coordinates;
  17. if(container.find(".pokelink").length > 0)
  18. container.find(".pokelink").attr("href" , url);
  19. else
  20. container.append("<p>"+ coordinates +"</p><p><a class=\"pokelink\" href=\""+ url +"\">Snipe me!</a></p>");
  21. },500);
  22. });