Advertisement
Guest User

Untitled

a guest
May 20th, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. javascript:
  2.     var countToday = $("#incomings_table td:nth-child(6):contains('dzisiaj')").length;
  3.     var countTomorow = $("#incomings_table td:nth-child(6):contains('jutro')").length;
  4.     $("#paged_view_content .modemenu").last().after("<div id='Carvtoday' style='cursor:pointer; margin:10px; border:1px solid black; max-width:90px;'>Na dzisiaj: "+ countToday +"</div>  <div id='CarvTomorow' style='cursor:pointer; margin:10px; border:1px solid black; max-width:90px;'>Na jutro: "+ countTomorow +"</div>");
  5.  
  6.  
  7.  
  8. $(document).on("click",
  9.                "#Carvtoday",
  10.                function() {
  11.  
  12.     $("#incomings_table td:nth-child(6)" ).each(function( index ) {
  13.         var contentTd = $(this).html();
  14.  
  15.         if(contentTd.includes("dzisiaj")){}
  16.         else{
  17.             $(this).closest("tr").remove();
  18.         }
  19.     });
  20.  
  21. });
  22.  
  23.  
  24. $(document).on("click",
  25.                "#CarvTomorow",
  26.                function() {
  27.  
  28.     $( "#incomings_table td:nth-child(6)" ).each(function( index ) {
  29.         var contentTd = $(this).html();
  30.  
  31.         if(contentTd.includes("jutro")){}
  32.         else{
  33.             $(this).closest("tr").remove();
  34.         }
  35.     });
  36.  
  37. });
  38.  
  39. $(document).on("click",
  40.                "#CarvBO",
  41.                function() {
  42.  
  43.     $( "#incomings_table td:nth-child(1)" ).each(function( index ) {
  44.         var contentTd = $(this).html();
  45.  
  46.         if(contentTd.includes("Atak")){}
  47.         else{
  48.             $(this).closest("tr").remove();
  49.         }
  50.     });
  51.  
  52. });
  53.  
  54.  
  55.  
  56.     $(document).ready(function () {
  57.         //Ilość ataków z tej wioski
  58.            $("#incomings_table td:nth-child(3)" ).each(function( index ) {
  59.                var href = $(this).find("a").attr("href");
  60.  
  61.         var count = $("#incomings_table td:nth-child(3) a[href='" + href +"']").length;
  62.         $(this).append("(" + count + ")");
  63.     });
  64.        
  65.         //ilość ataków na naszą wioskę
  66.       $("#incomings_table td:nth-child(2)" ).each(function( index ) {
  67.                var href = $(this).find("a").attr("href");
  68.  
  69.         var count = $("#incomings_table td:nth-child(2) a[href='" + href +"']").length;
  70.         $(this).append("(" + count + ")");
  71.     });
  72.        
  73.        
  74.  
  75.            var countBO = $("#incomings_table td:nth-child(1):contains('Atak')").length;
  76.         if(countBO > 0){
  77.                        $("#paged_view_content .modemenu").last().after("<div id='CarvBO' style='cursor:pointer; margin:10px; border:1px solid black; max-width:90px;'>Nieopisane: "+ countBO +"</div>");
  78.         }
  79.  
  80.  
  81.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement