1. JavaScript / Говнокод #27026

    0

    1. 1
    jQuery( this ).parent().parent().parent().parent().parent().parent().parent().parent().find(".crate_bottle").html(product_crate_price_final);

    arkasha, 13 Октября 2020

    Комментарии (2)
  2. JavaScript / Говнокод #27014

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    eventRowsStyle() {
        if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
           return {
               height: '187px'
           } 
       } else {
           return {
               height: '187px'
           } 
       }
    }

    Слишком много вопросов и мало ответов

    diman_suvor, 09 Октября 2020

    Комментарии (21)
  3. JavaScript / Говнокод #27013

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    handleShowScheduler() {
                    console.log(this.$parent.$parent.$parent.showScheduler, 'sch')
                    if (this.$parent.$parent.$parent.showScheduler) {
                        this.$parent.$parent.$parent.showScheduler = false;
                        setTimeout(() => {
                            this.$parent.$parent.$parent.showScheduler = true;
                        }, 200)
                    } else {
                        this.$parent.$parent.$parent.showScheduler = true;
                    }
                },

    diman_suvor, 09 Октября 2020

    Комментарии (1)
  4. JavaScript / Говнокод #26992

    0

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    const breakpointChecker = function() {
        if ( breakpoint.matches === true ) {
            //...
            return;
        } else if ( breakpoint.matches === false ) {
            //...
        }
    };

    Источник: https://medium.com/@networkaaron/swiper-how-to-destroy-swiper-on-min-width-breakpoints-a947491ddec8

    denistrator, 01 Октября 2020

    Комментарии (5)
  5. JavaScript / Говнокод #26973

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    class HelloRooster implements EditorPlugin {
        getName() {
            return 'HelloRooster';
        }
    
        initialize(editor: Editor) {}
    
        dispose() {}
    
        onPluginEvent(e: PluginEvent) {
            if (e.eventType == PluginEventType.KeyPress && e.rawEvent.which == 65) {
                alert('Hello Rooster');
            }
        }
    }

    https://github.com/microsoft/roosterjs

    3_dar, 24 Сентября 2020

    Комментарии (0)
  6. JavaScript / Говнокод #26967

    0

    1. 1
    <img alt="[object Object]" title="[object Object]" loading="lazy">

    https://beru.ru/catalog/avtotovary/76688?hid=90402 , когда смог в жс на бэкэнде

    phpBidlokoder2, 21 Сентября 2020

    Комментарии (5)
  7. JavaScript / Говнокод #26965

    +1

    1. 1
    Чем пакеты "npm" лучше старых добрых плагинов "jQuery"?

    Плагины зависели только от самого "jQuery", а пакеты волокут за собою десятки и сотни левых говен.

    rotoeb, 20 Сентября 2020

    Комментарии (0)
  8. JavaScript / Говнокод #26907

    −1

    1. 1
    // https://habr.com/ru/company/ruvds/blog/515676/

    Разбор худшего в мире куска кода.

    GDMaster, 02 Сентября 2020

    Комментарии (75)
  9. JavaScript / Говнокод #26885

    −1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    $(document).on('click','.head__loginw a',function() { 
    	//реачгоал и гугл для клика по ссылке кабинете
    	return true;
     })
    
    $(document).on('click','.prc__it__bt openModal',function() { 
    	id = $(this).attr('tid');
    	if(id == 387) {
    	   //мир - 30
    	}
    	if(id == 388) {
    	   //мир - 60
    	}
    	
    	if(id == 389) {
    	   //мир - 100
    	}
    	
    	if(id == 391) {
    	   //МИР-ДОМ-30
    	}
    	
    	if(id == 392) {
    	   //мМИР-ДОМ-60
    	}
    	if(id == 393) {
    	   //мМИР-ДОМ-100
    	}
    	return true;
    	})

    snegoviktlt, 20 Августа 2020

    Комментарии (2)
  10. JavaScript / Говнокод #26878

    −1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    updateTimer() {
                requestAnimationFrame(() => {
                    this.timeLeft = this.resendTimeDuration - (Date.now() * 0.001 - this.lastTimeLeft);
    
                    if (this.timeLeft <= 0) {
                        this.resetTimer();
                        return;
                    } else {
                        this.lastTimeLeft = this.timeLeft;
                        this.updateTimer();
                    }
                });
    }

    А как сделать таймер обратного отсчета?

    somebodyoncetoldme, 18 Августа 2020

    Комментарии (1)