- 1
- 2
- 3
var t1 = "http://www.mno";
var t2 = ".ru/new_an";
$("#mnganketa").attr("href", t1+"go"+t2+"keta/name.html?range=877");
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+157
var t1 = "http://www.mno";
var t2 = ".ru/new_an";
$("#mnganketa").attr("href", t1+"go"+t2+"keta/name.html?range=877");
Замена ссылки=)
+156
if(!item.contact.middleInitial)
{
fullAddress = item.contact.firstName+' '+item.contact.lastName+' '
+item.contact.companyName+' '+item.streetLine1 +' '+item.city +', '+item.state +' '+item.postalCode;
}
else
{
fullAddress = item.contact.firstName+' '+item.contact.middleInitial+' '+item.contact.lastName+' '
+item.contact.companyName+' '+item.streetLine1 +' '+item.city +', '+item.state +' '+item.postalCode;
}
Сабж))
+158
this.addItem = function(item) {
if (item.id == null & item.Name != null & item.Name != '') {
item.id = uid++;
items.push(item);
$window.sessionStorage.setItem('items', JSON.stringify(items));
} else {
for (i in items) {
if (items[i].id == item.id) {
items[i] = item;
}
}
}
}
+164
window.onload = function (){
var divs=document.getElementsByTagName("DIV");
for( var i=0; i<divs.length; i++)
if(divs[i].className=="pro")
divs[i].style.minHeight=0+"px"
;
}
Целостность кода сохранена.
+159
define([ "t5/core/dom" ], function(dom) {
return function() {
dom.scanner("select,input[type=text]", function(el) {
el.on("focus", function(e) {
var focusholder = this.findParent("form").find("input.focusholder");
if (focusholder.length)
focusholder[0].element.value = el.element.id;
el.element.select();
});
});
dom.scanner("select,input[type=text]", function(el) {
el.on("change", function(e) {
var form = this.findParent("form");
var submit = form.find("input[type=submit]");
if (submit.length)
submit[0].element.disabled = "disabled";
setTimeout(function() {form.trigger("submit");}, 1);
});
});
dom.scanner("input[type=checkbox],input[type=radio]", function(el) {
el.on("click", function(e) {
return this.findParent("form").trigger("submit");
});
});
dom.scanner("form", function(el) {
el.on("submit", function(e) {
var form=this;
setTimeout(function() {
var children = form.find("select,input[type=text],input[type=checkbox],input[type=radio]");
if (children.length)
for(var i=0;i<children.length;i++)
children[i].element.readOnly = "readOnly";
var submit = form.find("input[type=submit]");
if (submit.length)
submit[0].element.disabled = "disabled";
}, 1);
});
});
return dom;
};
});
код превращается, код превращается... в говно!
+159
null != localStorage.getItem("lock") && "2" == localStorage.getItem("lock") &&
($(".up_link").css("bottom", 0), $(".popular").removeClass("open")),
e.find(".door").on("click", function() {
return "2" == localStorage.getItem("lock") ?
($(".up_link").css("bottom", 80), e.addClass("open"),
localStorage.setItem("lock", "1")) :
($(".up_link").css("bottom", 0), e.removeClass("open"),
localStorage.setItem("lock", "2")), !1
});
Пример кода с echo.msk.ru
+160
var hgh = $(document).height() - 320 - 180 - 440;
$(".message-form").height( hgh );
шта?
+161
this.$items = this.$items.last().add(this.$items.not(this.$items.last()));
this.$items – jQuery многоножка
+158
var picNumber = +!backgroundBlock.data('number');
или не говнокод?
+159
!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.JSZipUtils=e():"undefined"!=typeof global?global.JSZipUtils=e():"undefined"!=typeof self&&(self.JSZipUtils=e())}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
'use strict';
var JSZipUtils = {};
...
module.exports = JSZipUtils;
// enforcing Stuk's coding style
// vim: set shiftwidth=4 softtabstop=4:
},{}]},{},[1])
(1)
});
;
пох, что не читается без бьютифаера, зато модульность