- 1
if(typeof n!="number"&&(k==Number||!(n instanceof Number))||p.round(n)!=n||n==NaN||n==Infinity)return!1;
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+147
if(typeof n!="number"&&(k==Number||!(n instanceof Number))||p.round(n)!=n||n==NaN||n==Infinity)return!1;
+147
var yagooduser = sustr('Мой',1);
Чел прислал в асю и удивляется, почему не работает
+160
uWeb_b = function(text,cl,onclick,width){return '<div style="width:'+width+'px" class='+cl+' onclick='+onclick+' id="uWeb_Button">'+text+'</div>';}
uWeb_b2 = function(text,cl,onclick,width){return '<div style="width:'+width+'px" class='+cl+' onclick='+onclick+' id="uWeb_Button2">'+text+'</div>';}
uWeb_b3 = function(text,cl,onclick,width){return '<div style="width:'+width+'px" class='+cl+' onclick='+onclick+' id="uWeb_Button3">'+text+'</div>';}
+159
jQuery("select[id='select1']").change(
function ()
{
var city_id = jQuery(this).attr("value");
jQuery("select[id='select_hotel']").html('<option>Выберите категорию</option>');
jQuery("select[name='room']").html('<option>Выберите категорию и отель</option>');
jQuery("select[id='select_5']").change(
function ()
{
....................................
}
);
}
);
обратите внимание на то, как селекторы объектов написаны.. автор вместо "#select1" пишет "select[id='select1']" зачем это делать непонятно.
наговнокодено на сайте el-tour.com
+170
(function(a){ var m
return (m=a.length)<2 ? a[0] : (m=a[--m],a.length--,(a[a.length-1]>m)&&(a[a.length-1]=m),arguments.callee(a))
})(this.prop)
Вроде бы ищет минимум в this.prop.
P.S. this.prop как массив удаляется. Равен результату.
+171
var e=("article,aside,footer,header,nav,section").split(',');
Найдено в дебрях одного сайта.
+162
<script type="text/javascript">
............................
var titlePubOk = "<?php echo 'Показано'; ?>";
var titlePubNo = "<?php echo 'Скрыто'; ?>";
............................
</script>
Вот обновляю систему и вдруг обнаружил собственный, самый натуральный говнокод. Это - невероятно!
+163
// Checks if the passed input's value is nothing.
function isEmptyText(theField)
{
// Copy the value so changes can be made..
var theValue = theField.value;
// Strip whitespace off the left side.
while (theValue.length > 0 && (theValue.charAt(0) == ' ' || theValue.charAt(0) == '\t'))
theValue = theValue.substring(1, theValue.length);
// Strip whitespace off the right side.
while (theValue.length > 0 && (theValue.charAt(theValue.length - 1) == ' ' || theValue.charAt(theValue.length - 1) == '\t'))
theValue = theValue.substring(0, theValue.length - 1);
if (theValue == '')
return true;
else
return false;
}
...
function in_array(variable, theArray)
{
for (var i in theArray)
if (theArray == variable)
return true;
return false;
}
+164
<script type="text/javascript">
/* vedomosti mercedes fullscreen second pages */
var ref=document.referrer;
var cookie=Get_Cookie('ved_fullscreen2_1');
if (!cookie && ref!='' && ref!='none' && ref!='blocked' && 'http://'==ref.substring(0,7)) {
ref=ref.substring(7);
var pos=ref.indexOf('/');
var invalid='.vedomosti.ru';
if (pos>0) ref=ref.substring(0,pos);
if (ref.substring( ref.length-invalid.length ) != invalid) {
Set_Cookie('ved_cookie_test',1,1);
if (Get_Cookie('ved_cookie_test')) {
Set_Cookie('ved_fullscreen2_1', 1, 1 * 24 * 3600, '/');
document.location.href = 'http://www.vedomosti.ru/var/bansrc/2011/9a6776.html#!'+(document.location.pathname);
}
}
}
</script>
журнализды из одной пафосной бульварной газетки копят на мерседес
+164
// Eolas workaround for IE (Thanks Kurt!)
if(jQuery.browser.msie){ this.outerHTML = this.outerHTML; }
Kurt == К.О.?