Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- javascript:
- var countToday = $("#incomings_table td:nth-child(6):contains('dzisiaj')").length;
- var countTomorow = $("#incomings_table td:nth-child(6):contains('jutro')").length;
- $("#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>");
- $(document).on("click",
- "#Carvtoday",
- function() {
- $("#incomings_table td:nth-child(6)" ).each(function( index ) {
- var contentTd = $(this).html();
- if(contentTd.includes("dzisiaj")){}
- else{
- $(this).closest("tr").remove();
- }
- });
- });
- $(document).on("click",
- "#CarvTomorow",
- function() {
- $( "#incomings_table td:nth-child(6)" ).each(function( index ) {
- var contentTd = $(this).html();
- if(contentTd.includes("jutro")){}
- else{
- $(this).closest("tr").remove();
- }
- });
- });
- $(document).on("click",
- "#CarvBO",
- function() {
- $( "#incomings_table td:nth-child(1)" ).each(function( index ) {
- var contentTd = $(this).html();
- if(contentTd.includes("Atak")){}
- else{
- $(this).closest("tr").remove();
- }
- });
- });
- $(document).ready(function () {
- //Ilość ataków z tej wioski
- $("#incomings_table td:nth-child(3)" ).each(function( index ) {
- var href = $(this).find("a").attr("href");
- var count = $("#incomings_table td:nth-child(3) a[href='" + href +"']").length;
- $(this).append("(" + count + ")");
- });
- //ilość ataków na naszą wioskę
- $("#incomings_table td:nth-child(2)" ).each(function( index ) {
- var href = $(this).find("a").attr("href");
- var count = $("#incomings_table td:nth-child(2) a[href='" + href +"']").length;
- $(this).append("(" + count + ")");
- });
- var countBO = $("#incomings_table td:nth-child(1):contains('Atak')").length;
- if(countBO > 0){
- $("#paged_view_content .modemenu").last().after("<div id='CarvBO' style='cursor:pointer; margin:10px; border:1px solid black; max-width:90px;'>Nieopisane: "+ countBO +"</div>");
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement