- 1
- 2
var EditParameter = eval($('#droppable1').attr("data"));
var parameter = eval($('#droppable1').attr("data1"));
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+123
var EditParameter = eval($('#droppable1').attr("data"));
var parameter = eval($('#droppable1').attr("data1"));
А Вам слабо ?!
+157
<SCRIPT language=JavaScript> <!--#### Подпрограммы (скрипты) для вывода фотографий составных частей ПК #### -->
function picture1(){
window.open("P4P800.jpg", "newwindow01", config="width=460, height=515, toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0");
}
function picture2(){
window.open("CPU.jpg", "newwindow02", config="width=355, height=380, toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0");
}
function picture3(){
window.open("Video.jpg", "newwindow03", config="width=475, height=380, toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0");
}
function picture4(){
window.open("Syst.jpg", "newwindow04", config="width=220, height=220, toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0");
}
function picture5(){
window.open("audio.jpg", "newwindow05", config="width=315, height=200, toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0");
}
function picture6(){
window.open("Seti.jpg", "newwindow06", config="width=190, height=120, toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0");
}
function picture7(){
window.open("hdd.jpg", "newwindow07", config="width=725, height=425, toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0");
}
function picture8(){
window.open("dvd.jpg", "newwindow08", config="width=520, height=205, toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0");
}
function picture9(){
window.open("korpus.jpg", "newwindow09", config="width=820, height=435, toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0");
}
function picture10(){
window.open("monitor.jpg", "newwindow10", config="width=320, height=320, toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0");
}
function picture11(){
window.open("Klava.jpg", "newwindow11", config="width=510, height=250, toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0");
}
function picture12(){
window.open("Mouse.jpg", "newwindow12", config="width=340, height=285, toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0");
}
function picture13(){
window.open("print.jpg", "newwindow13", config="width=467, height=295, toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0");
}
function picture14(){
window.open("RAM.jpg", "newwindow14", config="width=530, height=135, toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0");
}
</script> <!--#### Конец скриптов ####-->
+158
if (
event.which == $.ui.keyCode.COMMA ||
event.which == $.ui.keyCode.ENTER ||
(
event.which == $.ui.keyCode.TAB &&
that._tagInput.val() !== ''
) ||
(
event.which == $.ui.keyCode.SPACE &&
that.options.allowSpaces !== true &&
(
$.trim(that._tagInput.val()).replace( /^s*/, '' ).charAt(0) != '"' ||
(
$.trim(that._tagInput.val()).charAt(0) == '"' &&
$.trim(that._tagInput.val()).charAt($.trim(that._tagInput.val()).length - 1) == '"' &&
$.trim(that._tagInput.val()).length - 1 !== 0
)
)
)
) {
event.preventDefault();
that.createTag(that._cleanedInput());
// The autocomplete doesn't close automatically when TAB is pressed.
// So let's ensure that it closes.
that._tagInput.autocomplete('close');
}
https://github.com/aehlke/tag-it/blob/master/js/tag-it.js#L183
+152
$cxp_pen.Submit = function() {
var c = t(cxp_pen_common_data.fnFldId, cxp_pen_common_data.lnFldId, cxp_pen_common_data.fnEFldId, cxp_pen_common_data.lnEFldId);
if (c) {
var a = u(cxp_pen_common_data.fnFldId, cxp_pen_common_data.fnEFldId),
b = false;
if (a)
b = v(cxp_pen_common_data.lnFldId, cxp_pen_common_data.lnEFldId);
if (a && b)
B()
}
};
Лучший способ обфускации в мире.
Отрыл в форме смены имени и фамилии в live.com, в попытках вставить различную хрень.
+160
jQuery('#text div.catalog_light div.num input[type="text"]').spinner({max: 999, min: 1});
jQuery('#text div.catalog_light div.num .ui-spinner-up').html('').css({'width' : '22px'}).css({'height' : '22px'});
jQuery('#text div.catalog_light div.num .ui-spinner-down').html('').css({'width' : '22px'}).css({'height' : '22px'});
jQuery('#text div.catalog_item_right div.line div.spinner input[type="text"]').spinner({max: 999, min: 1});
jQuery('#text div.catalog_item_right div.line div.spinner .ui-spinner-up').html('').css({'width' : '22px'}).css({'height' : '22px'});
jQuery('#text div.catalog_item_right div.line div.spinner .ui-spinner-down').html('').css({'width' : '22px'}).css({'height' : '22px'});
jQuery('#text div.catalog_item_additional div.double table div.spinner input[type="text"]').spinner({max: 999, min: 1});
jQuery('#text div.catalog_item_additional div.double table div.spinner .ui-spinner-up').html('').css({'width' : '22px'}).css({'height' : '22px'});
jQuery('#text div.catalog_item_additional div.double table div.spinner .ui-spinner-down').html('').css({'width' : '22px'}).css({'height' : '22px'});
jQuery('#text div.catalog div.content div.text div.spinner input[type="text"]').spinner({max: 999, min: 1});
jQuery('#text div.catalog div.content div.text div.spinner .ui-spinner-up').html('').css({'width' : '22px'}).css({'height' : '22px'});
jQuery('#text div.catalog div.content div.text div.spinner .ui-spinner-down').html('').css({'width' : '22px'}).css({'height' : '22px'});
+160
jQuery('#items > div > a > img').hover(
function(){
jQuery(this).css('border', 'solid 1px gray');
var pos = jQuery(this).parent().parent().position().left;
var posTop = jQuery(this).parent().parent().position().top;
jQuery(this).parent().parent().css('left', (pos-1));
jQuery(this).parent().parent().css('top', (posTop-1));
},
function(){
jQuery(this).css('border', '0');
var pos = jQuery(this).parent().parent().position().left;
var posTop = jQuery(this).parent().parent().position().top;
jQuery(this).parent().parent().css('left', (pos+1));
jQuery(this).parent().parent().css('top', (posTop+1));
}
)
Вот такой вот неожиданный вариант отображения рамочек вокруг изображений в галерее при наведении курсора мыши. Наткнулся в проекте, над которым сейчас работаю.
+141
<script type="text/javascript">
//<!--
var SITE_PATH = ''; var SITE_LANG = '';
//-->
</script>
<script type="text/javascript" src="/media/b724280b51052a3df70e38caed7434ff.js?files=jquery.js,govnokod.save.js,govnokod.js&v=4"></script>
Херня на вашем сайте)) Можно просто сделать в один код...
+160
new Array(100).map(function(x) { return Math.random() * 1000; });
Угадайте результат.
+165
function findeFreePlace()
{
try
{
var x = random(gs.cells.x - 1),
y = random(gs.cells.y - 1);
if (gs.balls[y][x] != null)
{
return findeFreePlace();
}
else
{
return [x, y];
}
}
catch (e)
{
isEndGame = true;
showfinish();
return false;
}
}
Игра "линии". Нужно случайно выбрать клеточку, в которую будет добавлен новый шарик. Ну, а чтобы узнать, что пустых клеточек нет, ловим ошибку переполнения стека.
+154
var num_normalize = function (num) {
if (typeof num == 'string') {
if (num.test('.')) {
return parseFloat(num).toFixed(2);
}
else {
return parseInt(num);
}
}
else if (parseInt(num) == parseFloat(num)) {
return parseInt(num);
}
else return parseFloat(num).toFixed(2);
};
Когда-то писал функцию для приведение чисел к одному виду, которые иногда приходили в виде стринги.
За говнокод сойдет?