1. JavaScript / Говнокод #133

    +44

    1. 1
    document.getElementById(element.id).checked = true;

    guest, 12 Декабря 2008

    Комментарии (27)
  2. JavaScript / Говнокод #111

    +133.2

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    9. 9
    if (a.length > 0){
        if (a.length <> 0){
            if (a.length == 7){
                if (a.length === 7){
                    return a;
                }
            }
        }
    }

    7 раз отмерь 1 отрежь

    guest, 11 Декабря 2008

    Комментарии (16)
  3. JavaScript / Говнокод #89

    +16.3

    1. 1
    val=(chb.checked?val|VAR_ID:val&~VAR_ID);

    позволяет сохранить в число 32 числа

    guest, 10 Декабря 2008

    Комментарии (0)
  4. JavaScript / Говнокод #77

    +22.6

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    var newstr = null;
    		var lastnewstr = null;
    		var newclass = null;
    		var lastclass = null;
    		var newstr2 = null;
    		var lastnewstr2 = null;
    		var newclass2 = null;
    		var lastclass2 = null;
    		var newstr3 = null;
    		var lastnewstr3 = null;
    		var newclass3 = null;
    		var lastclass3 = null;
    		
    function check(s, i)
    {
    		p1 = document.getElementById("id_1_"+i);
    		p2 = document.getElementById("id_2_"+i);
    	if (s!=lastnewstr)
    	{
    		newclass2 = p1.className;
    		newclass3 = p2.className;
    		newclass = s.className;
    		s.className="check";
    		p1.className="viz";
    		p2.className="viz";
    		if (lastnewstr!=null)
    		{
    			lastnewstr.className=lastclass;
    			lastnewstr2.className=lastclass2;
    			lastnewstr3.className=lastclass3;
    		}
    	}
    	lastnewstr = s;
    	lastnewstr2 = p1;
    	lastnewstr3 = p2;
    	lastclass = newclass;
    	lastclass2 = newclass2;
    	lastclass3 = newclass3;
    }

    Убожество которое на одной строке меняет у <tr> стиль и еще у двух элементов...

    guest, 08 Декабря 2008

    Комментарии (0)
  5. JavaScript / Говнокод #70

    +33.5

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    <script>
    function changeLogo(imgLoc){
        document.getElementById("module_logo").src = "./site/" + imgLoc + "_logo.jpg";
    }
    function returnLogo(imgLoc){
        document.getElementById("module_logo").src = "./site/" + imgLoc + "_logo.jpg";
    }
    </script>

    guest, 08 Декабря 2008

    Комментарии (5)
  6. JavaScript / Говнокод #14

    +35.6

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
        function getError() {
            var error = false;
            if (isNaN($('client_sum').value) || $('client_sum').value <= 0) {
                $('error_op').innerHTML = "Только число большее  нуля";
                error = true;
            } else {
                $('error_op').innerHTML = "";
            }
            if ($('comment').value == "") {
                $('error_op2').innerHTML = "Введите примечание";
                error = true;
            } else {
                $('error_op2').innerHTML = "";
            }
            if (error == true) return false;
        }

    guest, 25 Ноября 2008

    Комментарии (17)
  7. JavaScript / Говнокод #3

    +61

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    <html>
    
    <head>
      <title>В Контакте | Страницы юзера</title>
        <style type="text/css">
        	body{
        		background: black;
        		color: #D1D1D1;
        		font-family: "Trebuchet MS", Verdana, Geneva, Arial, Helvetica, sans-serif;
        		font-size: 1.2em;
        	}
        	div.body{
        		margin-left: auto;
        		margin-right: auto;
        		width: 520px;
        	}
        	a{color: #D1D1D1; text-decoration: none;}
        	a:hover{color: #3e9af2; text-decoration: underline;}
        	li{white-space: nowrap; list-style: none;}
        	input{
        		background: black;
        		color: #D1D1D1;
        		border:none;
        		border-bottom: 1px dotted #D1D1D1;
        		font-family: "Trebuchet MS", Verdana, Geneva, Arial, Helvetica, sans-serif;
        		font-size: 1.2em;
        		margin-bottom: -2px;
        	}
        </style>
    	<script type="text/javascript">
    	<!--//
    	function set_id(){
    		var user_id_1 = document.getElementById('user_id').value.replace(/[^\d]/g, "");
    		var user_id_2 = user_id_1 + '&' + Math.round(Math.random() * 999999);
    
    		var user_links = '';
    		user_links += '<ul>';
    		user_links += '	<li><a href="http://vkontakte.ru/id' + user_id_1 + '?' + Math.round(Math.random() * 999999) + '" target="_blank">Главная страница</a></li>';
    		user_links += '	<li>';
    		user_links += '		<a href="http://vkontakte.ru/wall.php?id=' + user_id_2 + '" target="_blank">Стена</a>';
    		user_links += '		<ul>';
    		user_links += '			<li><a href="http://vkontakte.ru/wall.php?act=write&id=' + user_id_2 + '" target="_blank">Оставить сообщение</a></li>';
    		user_links += '			<li><a href="http://vkontakte.ru/graffiti.php?act=draw&to_id=' + user_id_2 + '" target="_blank">Оставить графити</a></li>';
    		user_links += '			<li><a href="http://vkontakte.ru/photos.php?to_id=' + user_id_2 + '" target="_blank">Оставить фото</a></li>';
    		user_links += '			<li><a href="http://vkontakte.ru/video.php?to_id=' + user_id_2 + '" target="_blank">Оставить видио</a></li>';
    		user_links += '			<li><a href="http://vkontakte.ru/audio.php?to_id=' + user_id_2 + '" target="_blank">Оставить аудио</a></li>';
    		user_links += '		</ul>';
    		user_links += '	</li>';
    		user_links += '	<li><a href="http://vkontakte.ru/mail.php?act=write&to=' + user_id_2 + '" target="_blank">Отправить сообщение</a></li>';
    		user_links += '	<li><a href="http://vkontakte.ru/friend.php?id=' + user_id_2 + '" target="_blank">Друзья</a></li>';
    		user_links += '	<li><a href="http://vkontakte.ru/photos.php?id=' + user_id_2 + '" target="_blank">Альбомы</a></li>';
    		user_links += '	<li><a href="http://vkontakte.ru/photos.php?act=user&id=' + user_id_2 + '" target="_blank">Фото с юзером</a></li>';
    		user_links += '	<li><a href="http://pda.vkontakte.ru/taggedphotos' + user_id_1 + '" target="_blank">Фото с юзером, если надо посмотреть скрытые фото</a></li>';
    		user_links += '	<li><a href="http://vkontakte.ru/video.php?id=' + user_id_2 + '" target="_blank">Видeо</a></li>';
    		user_links += '	<li><a href="http://vkontakte.ru/questions.php?mid=' + user_id_2 + '" target="_blank">Вопросы</a></li>';
    		user_links += '	<li><a href="http://vkontakte.ru/notes.php?id=' + user_id_2 + '" target="_blank">Заметки</a></li>';
    		user_links += '	<li><a href="http://vkontakte.ru/apps.php?mid=' + user_id_2 + '" target="_blank">Приложения</a></li>';
    		user_links += '	<li><a href="http://vkontakte.ru/groups.php?mid=' + user_id_2 + '" target="_blank">Группы</a></li>';
    		user_links += '</ul>';
    
            document.title = 'В Контакте | Страницы юзера id' + user_id_1;
            document.getElementById('user_id').value = user_id_1;
    		document.getElementById('user_pages').innerHTML = user_links;
    	}
    	//-->
    	</script>
    </head>
    <body onLoad="set_id()">
    	<div class="body">
    		Страницы юзера id<input name="user_id" id="user_id" type="text" value="1" onKeyUp="set_id()" onKeyPress="set_id()" onPaste="set_id()">
    		<div id="user_pages"></div>
    		<noscript><p align="center">Ипать))) ... ктож а таком старье сидит)....<br />Включи JavaScript!</p></noscript>
    		<p align="center">by Dr.Freez</p>
    	</div>
    </body>
    
    </html>

    говницо)))

    guest, 23 Ноября 2008

    Комментарии (163)