- 1
form = _this.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement;
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−1
form = _this.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement;
https://github.com/interesnij/new_burials/commit/0d04adfe064c3a36d377548e44114fec4e8a585b ?diff=unified&w=0#diff-e549478298ec34990a6a4e60de6993615daa3b76 120c6333aa756e19a942c45cR318
Ему не хватило пяти, решил шестой раз добавить.
0
export type ReplaceNullToUndefined<T> = T extends (infer R)[]
? ReplaceNullToUndefined<R>[]
: T extends object
? {
[K in keyof T]: T[K] extends object
? ReplaceNullToUndefined<T[K]>
: null extends T[K]
? Exclude<T[K], null> | undefined
: T[K];
}
: T;
Заменяет все `null` на `undefined`
+1
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
0
$('.swiper-wrapper')
.addClass('owl-carousel')
.owlCarousel({
items: 4,
margin: 10,
dots: true,
dotSpeed: 1000,
nav: false,
lazyContent: true
});
0
const handleChange = (event: ChangeEvent<HTMLInputElement>) => {
const price = Number(event.target.value);
setPrice(price);
if (timer) {
clearTimeout(timer);
setTimer(null);
}
const validPrice = validatePrice(price);
if (event.target.id.includes("cause")) {
handleOnChange(validPrice);
} else {
const timerId: any = setTimeout(() => {
setPrice(validPrice);
handleOnChange(validPrice);
}, 1000);
setTimer(timerId);
}
};
:hang:
0
export type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
Адская супер-хуйня отсюда https://github.com/deneruaraujo/daily-diet-api
Я не понял что она делает, даже небо, даже Аллах
0
bot.onText(/\/now/, (message) => {
const DayOfTheWeek = new Date().toLocaleString('en-GB', { weekday: 'long' });
const currentTime = new Date();
let timeLeft = null;
let currentLesson = "";
for (let LessonId of Object.keys(lessons.v1[DayOfTheWeek])) {
const lesson = lessons.v1[DayOfTheWeek][LessonId];
const date = `${currentTime.getFullYear()}-${(currentTime.getMonth()+1).toString().padStart(2, '0')}-${currentTime.getDate().toString().padStart(2, '0')}`;
const startLessonTime = new Date(`${date}T${lesson.start}:00.001Z`);
const endLessonTime = new Date(`${date}T${lesson.end}:00.001Z`);
if (currentTime.toLocaleString('en-GB', {timeZone: 'Europe/Moscow'}) >= startLessonTime.toLocaleString('en-GB', {timeZone: 'Africa/Ouagadougou'}) && currentTime.toLocaleString('en-GB', {timeZone: 'Europe/Moscow'}) <= endLessonTime.toLocaleString('en-GB', {timeZone: 'Africa/Ouagadougou'})) {
currentLesson = lesson.name;timeLeft = (endLessonTime-currentTime) / 1000;
timeLeft=timeLeft-10800+2;
break;
};
};
if (currentLesson && timeLeft) {
const minutes = Math.floor(timeLeft / 60);
const seconds = Math.floor(timeLeft % 60);
bot.sendMessage(message.chat.id, `щяс урок: ${currentLesson}\nдо конца осталось ${minutes} минут ${seconds} секунд`);
} else {
bot.sendMessage(message.chat.id, 'Сейчас нет уроков');
};
});
это я ночью говнокодил, ВАХхфВАХХВхаххвАХАВхаВХАХАХахвх
0
// ******************************************************************************************************
function ch_new_nav()
{
if((document.getElementById('navig_dat').value.length==10)&&(document.getElementById('navig_smen').value>0)&&(document.getElementById('sel_res_div').value>0))
{
current_resource_id = document.getElementById('val_res_new_nav').getAttribute('data-user-id');
document.getElementById('cur_res_pred_op').src='index.php?do=show&formid=159&p0='+document.getElementById('navig_dat').value.substr(0,4)+document.getElementById('navig_dat').value.substr(5,2)+document.getElementById('navig_dat').value.substr(8,2)+'&p1='+document.getElementById('navig_smen').value+'&p2='+document.getElementById('sel_res_div').value + '¤t_resource_id='+current_resource_id;
document.getElementById('cur_res_pred_op').style.display='block';
// $("#vpdiv").animate({scrollTop:$('#cur_res_pred_op').offset().top+"px"});
document.getElementById('nav_tekysh_1').innerText = document.getElementById('navig_dat').value.substr(8,2)+'.'+document.getElementById('navig_dat').value.substr(5,2)+'.'+document.getElementById('navig_dat').value.substr(0,4);
document.getElementById('nav_tekysh_2').innerText = document.getElementById('navig_smen').value;
document.getElementById('nav_tekysh_3').innerText = document.getElementById('val_res_new_nav').value;
document.getElementById('nav_tekysh_4').innerText = document.getElementById('sel_res_div').value;
document.getElementById('nav_tekysh_1').name = document.getElementById('navig_dat').value.substr(0,4)+document.getElementById('navig_dat').value.substr(5,2)+document.getElementById('navig_dat').value.substr(8,2);
document.getElementById('nav_tekysh_2').name = document.getElementById('navig_smen').value;
document.getElementById('nav_tekysh_3').name = document.getElementById('sel_res_div').value;
var spl_op_res = arr_oprs_c_r_2[document.getElementById('sel_res_div').value].split('|');
var spl_op_res_arr = [];
for (var spl_f_ar=0; spl_f_ar<spl_op_res.length; spl_f_ar++)
spl_op_res_arr[spl_op_res[spl_f_ar]] = spl_op_res[spl_f_ar];
document.getElementById('park_sel_cur_res').innerHTML='<option value="0" selected>Получение списка</option>';
document.getElementById('park_sel_cur_res').setAttribute('onchange', 'check_sel_park_pr(this.value)');
vote3('full_plan_sz_ch_park.php?p1='+document.getElementById('sel_res_div').value);
for (var td_c_pr=0; td_c_pr<document.getElementsByName('pr_cur_r_op').length; td_c_pr++)
{
var split_rgb_obj = document.getElementsByName('pr_cur_r_park')[td_c_pr].parentNode.style.background;
var split_rgb_obj_repl = split_rgb_obj.replace('rgb(','');
split_rgb_obj_repl = split_rgb_obj_repl.replace(')','');
split_rgb_obj_repl = split_rgb_obj_repl.replace(' ','');
split_rgb_obj_repl = split_rgb_obj_repl.replace(' ','');
split_rgb_obj_repl = split_rgb_obj_repl.replace(' ','');
split_rgb_obj_repl = split_rgb_obj_repl.split(',');
if ((split_rgb_obj_repl[0]=='221')&&(split_rgb_obj_repl[1]=='255')&&(split_rgb_obj_repl[2]=='221'))
{
document.getElementsByName('pr_cur_r_op')[td_c_pr].style.background='#ddffdd';
document.getElementsByName('pr_cur_r_park')[td_c_pr].style.background='#ddffdd';
}
else
{
document.getElementsByName('pr_cur_r_op')[td_c_pr].style.background='#fff';
document.getElementsByName('pr_cur_r_park')[td_c_pr].style.background='#fff';
}
if (document.getElementsByName('pr_cur_r_op')[td_c_pr].parentNode.cells[8].innerHTML.indexOf('<img') !== -1)
{
var id_op_add_ind_0 = document.getElementsByName('pr_cur_r_op')[td_c_pr].parentNode.cells[8].getElementsByTagName('a')[0].getAttribute('onclick').indexOf('del_op_in_sz');
var id_op_add_ind = document.getElementsByName('pr_cur_r_op')[td_c_pr].parentNode.cells[8].getElementsByTagName('a')[0].getAttribute('onclick').indexOf('(',id_op_add_ind_0);
var id_op_add_ind_1 = document.getElementsByName('pr_cur_r_op')[td_c_pr].parentNode.cells[8].getElementsByTagName('a')[0].getAttribute('onclick').indexOf(',',id_op_add_ind);
var id_op_add_ind_2 = document.getElementsByName('pr_cur_r_op')[td_c_pr].parentNode.cells[8].getElementsByTagName('a')[0].getAttribute('onclick').substr((id_op_add_ind+1),(id_op_add_ind_1-id_op_add_ind-1));
document.getElementsByName('pr_cur_r_op')[td_c_pr].parentNode.cells[8].getElementsByTagName('a')[0].innerHTML='<b name="pr_cur_r_op_b">>>></b>';
document.getElementsByName('pr_cur_r_op')[td_c_pr].parentNode.cells[8].getElementsByTagName('a')[0].setAttribute('onclick','add_op_in_sz('+id_op_add_ind_2+',this)');
}
document.getElementsByName('pr_cur_r_op_b')[td_c_pr].setAttribute('style','font-size:100%; color:#23609E;');
if (spl_op_res_arr[document.getElementsByName('pr_cur_r_op')[td_c_pr].id.substr(9)])
{
document.getElementsByName('pr_cur_r_op')[td_c_pr].style.background='#99ff99';
document.getElementsByName('pr_cur_r_op_b')[td_c_pr].setAttribute('style','font-size:150%; color:#13BD13;');
}
} // for (var td_c_pr=0; td_c_pr<document.getElementsByName('pr_cur_r_op').length; td_c_pr++)
} // if((document.getElementById('navig_dat').value.length==10)&&(document.getElementById('navig_smen').value>0)&&(document.getElementById('sel_res_div').value>0))
else
alert('Выберите дату, смену, ресурс!');
} // function ch_new_nav()
0
Events.on(EventType.ClientLoadEvent, () => {
const oneDialog = new BaseDialog(" ");
oneDialog.cont.add(" ").row();
oneDialog.cont.button("OK", () => {
oneDialog.hide();
const twoDialog = new BaseDialog(" ");
twoDialog.cont.add(" ").row();
twoDialog.cont.button("OK", () => {
twoDialog.hide();
const threeDialog = new BaseDialog(" ");
threeDialog.cont.add(" ").row();
threeDialog.cont.button("OK", () => {
threeDialog.hide();
const fourDialog = new BaseDialog(" ");
fourDialog.cont.add(" ").row();
fourDialog.cont.button("OK", () => {
fourDialog.hide();
const fiveDialog = new BaseDialog(" ");
fiveDialog.cont.add(" ").row();
fiveDialog.cont.button("OK", () => {
fiveDialog.hide();
const sixDialog = new BaseDialog(" ");
sixDialog.cont.add(" ").row();
sixDialog.cont.button("OK", () => {
sixDialog.hide();
const sevenDialog = new BaseDialog(" ");
sevenDialog.cont.add(" ").row();
sevenDialog.cont.button("OK", () => {
sevenDialog.hide();
const eightDialog = new BaseDialog(" ");
eightDialog.cont.add(" ").row();
eightDialog.cont.button("OK", () => {
eightDialog.hide();
const nineDialog = new BaseDialog(" ");
nineDialog.cont.add(" ").row();
nineDialog.cont.button("OK", () => {
nineDialog.hide();
const tenDialog = new BaseDialog(" ");
tenDialog.cont.add(" ").row();
tenDialog.cont.button("OK", () => {
tenDialog.hide();
const elevenDialog = new BaseDialog(" ");
elevenDialog.cont.add(" ").row();
elevenDialog.cont.button("OK", () => {
elevenDialog.hide();
const twelveDialog = new BaseDialog(" ");
twelveDialog.cont.add(" ").row();
twelveDialog.cont.button("OK", () => {
twelveDialog.hide();
const thirteenDialog = new BaseDialog(" ");
thirteenDialog.cont.add(" ").row();
thirteenDialog.cont.button("OK", () => {
thirteenDialog.hide();
const fourteenDialog = new BaseDialog(" ");
fourteenDialog.cont.add(" ").row();
fourteenDialog.cont.button("OK", () => {
fourteenDialog.hide();
const fifteenDialog = new BaseDialog(" ");
fifteenDialog.cont.add(" ").row();
fifteenDialog.cont.button("OK", () => {fifteenDialog.hide();if(Core.settings.get("wentdowntherabbithole",false)){
const again = new BaseDialog(" ");
// ...
https://github.com/camelStyleUser/popup-unforked/blob/main/scripts/main.js
+2
const disabledConditions = [!element.isDraft].some((v) => Boolean(v) === true);
Из серии String(true).length === 4