Facebook
From Corrupt Stork, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 204
  1.                 <script>
  2.                                 m = ["Styczeń", "Luty", "Marzec", "Kwiecień","Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"];
  3.                                 d = ["Pon", "Wto", "Śro", "Czw","Pią", "Sob", "Nie"];
  4.                                 s = ["1", "4", "4", "7","2", "5", "7", "3", "6", "1", "4", "6"];
  5.                                 k = ["31", "28", "31", "30","31", "30", "31", "31", "30", "31", "30", "31"];
  6.                                 eventdays = ["Sty1", "Sty18", "Lut15", "Lut21","Lut6"];
  7.                                 eventinfo = ["Wydarzenie 1 Styczeń", "Wydarzenie 18 Styczeń", "Wydarzenie 15 Luty", "Wydarzenie 18 Luty","Wydarzenie 6 Luty"];
  8.                                 eventsize = eventdays.length;
  9.                                 dni = 1;
  10.                                 start = 50;
  11.                                         for(i = 0; i < 12; i++){
  12.                                                 max = 35;
  13.                                                 ile = 1;
  14.                                                 document.write("<div class="+"container"+ ">"+"</div>");
  15.                                                 start = s[i];
  16.                                                 koniec = k[i];
  17.                                                 if(start >= 5) max = 36
  18.                                                 miesiac = '<div id = "M2">' + m[i]+ ' ' + 2018 +'</div>';
  19.                                                 document.getElementsByClassName("container")[i].innerHTML += miesiac;
  20.                                                         for(j = 0; j < 7; j++){
  21.                                                                 dzien = '<div class = "dayname" id = "nazwy">' + d[j] + '</div>';
  22.                                                                 document.getElementsByClassName("container")[i].innerHTML += dzien;                                    
  23.                                                         }      
  24.                                                         for(z = 1; z <= max; z++){
  25.                                                                 if(start > z) dni = dni-start+1;
  26.                                                                 start=0;
  27.                                                                 timer = ile - s[i] + 1;
  28.                                                                 nazwa = m[i][0]+m[i][1]+m[i][2];
  29.                                                                 if(dni<=0)      numer = '<div class = "dayname">' + '</div>';
  30.                                                                 if(dni>0) numer = '<div class = "dayname"' + 'id='+ nazwa + timer +'>' + dni + '</div>';
  31.                                                                 document.getElementsByClassName("container")[i].innerHTML += numer;
  32.                                                                 if(dni == koniec){
  33.                                                                 dni = 0;
  34.                                                                 z = 36;
  35.                                                                 }                                                                      
  36.                                                         dni += 1;
  37.                                                         ile += 1;
  38.                                                         }
  39.                                         dni = 1;
  40.                                         }
  41.                                         for(n = 0; n<12; n++){
  42.                                         x = document.getElementsByClassName("container")[n];
  43.                                         x.id = "cid"+n;
  44.                                         }
  45.                                         for(w = 0; w < eventsize; w++){
  46.                                                 document.getElementById(eventdays[w]).style.backgroundColor = "red";
  47.                                                 document.getElementById(eventdays[w]).setAttribute("onclick","alert('specjalne wydarzenie');");
  48.                                                
  49.                                         }
  50.                 </script>