Advertisement
Guest User

123123

a guest
Mar 20th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. // ==UserScript==
  2. // @name mudaDeAldeiaV2PT59
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description try to take over the world!
  6. // @author You
  7. // @match https://pt59.tribalwars.com.pt/game.php?village=*&screen=*
  8. // @match https://pt59.tribalwars.com.pt/game.php?screen=overview_villages&intro
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. var aldeias = [29690,25609,28027];
  16. var strAldeias = ["1-ROYALTY","2-CAMP","3-STN MTN"];
  17. var i;
  18. var nAldeias = aldeias.length;
  19.  
  20. $("#ds_body > div.top_shadow").append("<table>");
  21.  
  22. for(i=0;i < nAldeias; i++){
  23. $("#ds_body > div.top_shadow > table").append("<tr>");
  24. //console.log(i);
  25.  
  26. var linha = i+1;
  27.  
  28.  
  29.  
  30. if(i >= 0){
  31. //$("#ds_body > div.top_shadow > table > tbody > tr:nth-child("+linha+")").append('<a id="'+aldeias[i]+'" href="https://pt59.tribalwars.com.pt/game.php?village='+aldeias[i]+'&screen=overview">'+strAldeias[i]+'</a>');
  32. $("#ds_body > div.top_shadow > table > tbody > tr:nth-child("+linha+")").append('<a id="'+aldeias[i]+'" href="https://pt59.tribalwars.com.pt/game.php?village='+aldeias[i]+'&screen=overview"> <button> '+strAldeias[i]+' </button></a>');
  33. $("#ds_body > div.top_shadow > table > tbody > tr:nth-child("+linha+")").append('<a id="'+aldeias[i]+'" href="https://pt59.tribalwars.com.pt/game.php?village='+aldeias[i]+'&screen=main"> <button> <img id="home" src="https://i.imgur.com/ppcOWrd.png" > </button></a>');
  34. $("#ds_body > div.top_shadow > table > tbody > tr:nth-child("+linha+")").append('<a id="'+aldeias[i]+'" href="https://pt59.tribalwars.com.pt/game.php?village='+aldeias[i]+'&screen=train"> <button> <img id="recruit" src="https://i.imgur.com/Xl0IHhS.png" > </button></a>');
  35. $("#ds_body > div.top_shadow > table > tbody > tr:nth-child("+linha+")").append('<a id="'+aldeias[i]+'" href="https://pt59.tribalwars.com.pt/game.php?village='+aldeias[i]+'&screen=market"> <button> <img id="market" src="https://i.imgur.com/E3X2aT6.png" > </button></a>');
  36. $("#ds_body > div.top_shadow > table > tbody > tr:nth-child("+linha+")").append('<a id="'+aldeias[i]+'" href="https://pt59.tribalwars.com.pt/game.php?village='+aldeias[i]+'&screen=snob"> <button> <img id="academia" src="https://i.imgur.com/ZOn4V1t.png" > </button></a>');
  37. //$("#ds_body > div.top_shadow > table > tbody > tr:nth-child("+linha+")").css("background-color", "orange");//Cor de background
  38. $("#ds_body > div.top_shadow > table > tbody > tr:nth-child("+linha+") a").css("color", "black");//Cor do link
  39. }
  40. }
  41. // Your code here...
  42. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement