- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
function isLogged() {
return '0';
return '';
}
function getForumPrefix() {
return 'forum/';
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+2
function isLogged() {
return '0';
return '';
}
function getForumPrefix() {
return 'forum/';
}
https://dota2.ru/forum/
0
;(function($) {
"use strict";
var rules = {
'~': 'Ё',
'`': 'ё',
'q': 'й',
'w': 'ц',
'e': 'у',
'r': 'к',
't': 'е',
'y': 'н',
'u': 'г',
'i': 'ш',
'o': 'щ',
'p': 'з',
'a': 'ф',
's': 'ы',
'd': 'в',
'f': 'а',
'g': 'п',
'h': 'р',
'j': 'о',
'k': 'л',
'l': 'д',
'z': 'я',
'x': 'ч',
'c': 'с',
'v': 'м',
'b': 'и',
'n': 'т',
'm': 'ь',
'Q': 'Й',
'W': 'Ц',
'E': 'У',
'R': 'К',
'T': 'Е',
'Y': 'Н',
'U': 'Г',
'I': 'Ш',
'O': 'Щ',
'P': 'З',
'A': 'Ф',
'S': 'Ы',
'D': 'В',
'F': 'А',
'G': 'П',
'H': 'Р',
'J': 'О',
'K': 'Л',
'L': 'Д',
'Z': 'Я',
'X': 'Ч',
'C': 'С',
'V': 'М',
'B': 'И',
'N': 'Т',
'M': 'Ь',
'[': 'х',
'{': 'Х',
']': 'ъ',
'}': 'Ъ',
';': 'ж',
':': 'Ж',
"'": 'э',
'"': 'Э',
',': 'б',
'<': 'Б',
'.': 'ю',
'>': 'Ю',
};
На jcat.ru вот сие чудо
+2
// куча if и небольшой кусок логики
// ...
} else {
response["message"] = "Access Denied";
response.shortlist = undefined;
callback(response);
}
} else {
response["message"] = "Access Denied";
response.shortlist = undefined;
callback(response);
}
} else {
response["message"] = "Access Denied";
response.shortlist = undefined;
callback(response);
}
});
} else {
response["message"] = "Access Denied";
response.shortlist = undefined;
callback(response);
}
} else {
response["message"] = "Access Denied";
response.shortlist = undefined;
callback(response);
}
} else {
response["message"] = "Access Denied";
response.shortlist = undefined;
callback(response);
}
} else {
response["message"] = "Invalid Method";
response.shortlist = undefined;
callback(response);
}
+2
public do(action: 'un' | 're'): void {
const result = (<any>this._appApi.app.documentManager.current)[action + 'do']();
if (!result.success) this._toastService.error(result.errorMessage, `Ошибка ${action}do`);
}
<button (click)="do('un')" title="Отменить"><i class="material-icons md-36">undo</i></button>
<button (click)="do('re')" title="Повторить"><i class="material-icons md-36">redo</i></button>
+2
var CodeMirror = require("codemirror");
var Thrift = require("thrift.js");
require("./src/my.css");
include(`gen-js/test_types.js')
include(`gen-js/TestServ.js')
include(`src/main.js')
Против m4 нет приёма.
+1
function CountBack_slider(secs,iid,j_timer) {
if (secs < 0) {
document.getElementById(iid).innerHTML = FinishMessage;
document.getElementById('caption'+j_timer).style.display = "none";
document.getElementById('heading'+j_timer).style.display = "none";
return;
}
DisplayStr = DisplayFormat.replace(/%%D%%/g, calcage(secs,86400,100000));
DisplayStr = DisplayStr.replace(/%%H%%/g, calcage(secs,3600,24));
DisplayStr = DisplayStr.replace(/%%M%%/g, calcage(secs,60,60));
DisplayStr = DisplayStr.replace(/%%S%%/g, calcage(secs,1,60));
var elems = document.getElementsByTagName('*'), i;
for (i in elems) {
if((' ' + elems[i].className + ' ').indexOf(' ' + iid + ' ')
> -1) {
elems[i].innerHTML = DisplayStr;
}
}
jQuery('.'+iid).innerHTML = DisplayStr;
if (CountActive)
setTimeout(function(){CountBack_slider((secs+CountStepper),iid,j_timer)}, SetTimeOutPeriod);
}
Работаю с купленным html5-шаблоном.
В шаблоне jq (и еще куча всякого хлама) подключен.
Кодили с мыслью "работает и *уй с ним".
+1
https://s1.postimg.org/9ay7hrf7fj/js-love-forever.png
heart, heart, JavaScript!
+5
const screenCssPixelRatio = (window.outerWidth - 8) / window.innerWidth;
const screenZoomed = screenCssPixelRatio !== 2.639089968976215;
if (screenZoomed) {
return scrollWidth + 4;
}
return scrollWidth;
Когда важна точность
+8
Для кульминации ебаных тендеций ебаных информационных технологий,
предлагаю выпустить новые процессоры интел со встроенным джаваскриптом.
Никакого больше ассемблера, никаких ядер, драйверов, ничего не нужно, на
каждом процессоре будет встроенный хардварный веб-сервер с нодежс,
общение с видеокартой, памятью, периферией будет только с помощью
API-вызовов, теперь каждый альтернативно интеллектуальный
жаваскрипт-разработчик сможет почувствовать себя системным программистом
+2
return $('#edit-btn').parent().parent().children().first().html().split('<')[0];