codefordayton/metroparks-tribute

View on GitHub

Showing 185 of 5,402 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

            $('.insivia-frmp-gallery-link').click(function(e) {
              e.preventDefault();
              put_to_slide($(this).children('a').attr('data-api'), $(this), $(this).children('a').attr('data-type'), $(this).children('a').attr('data-id'));
            });
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
tribute_files/insivia-frmp-script.js on lines 1583..1586

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 105.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    jQuery('.bike-sidebar-expand-btn').click(function(){
      if(!jQuery(this).hasClass('open')) {
        jQuery(this).addClass('open');
        jQuery('.menu-bike-month-site-menu-container').addClass('open');
      }else {
Severity: Major
Found in tribute_files/main.js and 2 other locations - About 3 hrs to fix
tribute_files/main.js on lines 154..162
tribute_files/navigation.js on lines 163..171

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 105.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        jQuery('.header-utility-nav-button').click(function(){
            if(!jQuery(this).hasClass('open')) {
                jQuery(this).addClass('open');
                jQuery('.header-utility-navigation').addClass('open');
            } else {
Severity: Major
Found in tribute_files/navigation.js and 2 other locations - About 3 hrs to fix
tribute_files/main.js on lines 154..162
tribute_files/main.js on lines 1025..1033

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 105.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

      jQuery('.park-banner-description-button').click(function() {
        if(!jQuery(this).hasClass('open')) {
          jQuery(this).addClass('open');
          jQuery('.park-banner-description-expand').addClass('open');
        } else {
Severity: Major
Found in tribute_files/main.js and 2 other locations - About 3 hrs to fix
tribute_files/main.js on lines 1025..1033
tribute_files/navigation.js on lines 163..171

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 105.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            if(json.facility.photos.length) {
              for(var i = 0; i<= json.facility.photos.length; ++i) {
                if(json.facility.photos[i]) {
                  slides += '<div class="gallery-slide insivia-frmp-gallery" style="background: url(' + json.facility.photos[i].photo + ') center center no-repeat; background-size: cover;"></div>';
                }
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
tribute_files/insivia-frmp-script.js on lines 1808..1815

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 104.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            if(json.facility.photos.length) {                
              for(var j = 0; j<= json.facility.photos.length; ++j) {
                if(json.facility.photos[j]) {
                  popUp += '<div class="popup-slider" style="background:url('+json.facility.photos[j].thumbnail+') center center no-repeat; background-size: cover;"></div>';
                }
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
tribute_files/insivia-frmp-script.js on lines 620..626

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 104.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        if(i == daysArray.length) {
          for(var n = w; n <= (dotwArray.length - 1); ++n) {
            if(n == dotwArray.length || n === 0) break;
            
            calendarBuild += '<div class="insivia-frmp-calendar-' + dotwArray[w].toLowerCase() + ' insivia-frmp-calendar-week-' + i + ' insivia-frmp-calendar-day insivia-frmp-event-day insivia-col-7 inactive"></div>';
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
tribute_files/insivia-frmp-script.js on lines 3220..3227

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 104.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        if(i == daysArray.length) {
          for(var n = w; n <= (dotwArray.length - 1); ++n) {
            if(n == dotwArray.length || n === 0) break;
            
            calendarBuild += '<div class="insivia-frmp-calendar-' + dotwArray[w].toLowerCase() + ' insivia-frmp-calendar-week-' + i + ' insivia-frmp-calendar-day insivia-frmp-event-day insivia-col-7 inactive"></div>';
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
tribute_files/insivia-frmp-script.js on lines 962..969

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 104.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

                      $.each($('.insivia-frmp-lighbox-popup-close'),function() {
                        $(this).click(function() {
                          var previous = document.referrer;
                          ( previous.indexOf('?parks')>-1) ? window.open(previous, '_self') : $('.insivia-frmp-lighbox').stop().fadeOut(800);
                        });
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 3 hrs to fix
tribute_files/insivia-frmp-script.js on lines 3246..3251
tribute_files/insivia-frmp-script.js on lines 3523..3528

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 103.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

            $.each($('.insivia-frmp-lighbox-popup-close'),function() {
              $(this).click(function() {
                var previous = document.referrer;
                ( previous.indexOf('?parks')>-1) ? window.open(previous, '_self') : $('.insivia-frmp-lighbox').stop().fadeOut(800);
              });
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 3 hrs to fix
tribute_files/insivia-frmp-script.js on lines 3246..3251
tribute_files/insivia-frmp-script.js on lines 3637..3642

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 103.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

      $.each($('.insivia-frmp-lighbox-popup-close'),function() {
        $(this).click(function() {
          var previous = document.referrer;
          ( previous.indexOf('?parks')>-1) ? window.open(previous, '_self') : $('.insivia-frmp-lighbox').stop().fadeOut(800);
        });
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 3 hrs to fix
tribute_files/insivia-frmp-script.js on lines 3523..3528
tribute_files/insivia-frmp-script.js on lines 3637..3642

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 103.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                    if( eventDay.getDay()+1 != 7 ) {
                    $('.insivia-frmp-list-view-days').append('<li id="list-date-' + idBuild+'" class="insivia-frmp-list-view-' + cleanDay.toLowerCase() + ' insivia-frmp-list-view-day insivia-frmp-event-day active hasEvent"><span class="insivia-frmp-list-view-date"><span class="insivia-frmp-list-view-display-date">' + monthsArray[newDay.getMonth()] + ' ' + newDay.getDate() + ', ' + newDay.getFullYear() + '</span> <span class="insivia-frmp-list-view-dotw">' + cleanDay + '</span></span><ul class="insivia-frmp-list-view-event-list"></ul></li>');
                    } else {
                      $('.insivia-frmp-list-view-days').append('<li id="list-date-' + idBuild+'" class="insivia-frmp-list-view-' + cleanDay.toLowerCase() + ' insivia-frmp-list-view-day insivia-frmp-event-day active hasEvent"><span class="insivia-frmp-list-view-date"><span class="insivia-frmp-list-view-display-date">' + monthsArray[newDay.getMonth()] + ' ' + newDay.getDate() + ', ' + newDay.getFullYear() + '</span> <span class="insivia-frmp-list-view-dotw">' + cleanDay + '</span></span><ul class="insivia-frmp-list-view-event-list"></ul></li>');
                    }
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
tribute_files/insivia-frmp-script.js on lines 2855..2857

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 99.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                if($('#list-date-' + idBuild).length === 0) {
                  $('.insivia-frmp-list-view-days').append('<li id="list-date-' + idBuild+'" class="insivia-frmp-list-view-' + dayOfTheWeek.toLowerCase() + ' insivia-frmp-list-view-day insivia-frmp-event-day active hasEvent"><span class="insivia-frmp-list-view-date"><span class="insivia-frmp-list-view-display-date">' + monthsArray[newDay.getMonth()] + ' ' + newDay.getDate() + ', ' + newDay.getFullYear() + '</span> <span class="insivia-frmp-list-view-dotw">' + dayOfTheWeek + '</span></span><ul class="insivia-frmp-list-view-event-list"></ul></li>');
                }
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 3 hrs to fix
tribute_files/insivia-frmp-script.js on lines 3102..3106

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 99.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    if(jQuery('.access-points-swiper-slide').length > 3) {
      var accessPointsswiper = new Swiper('.access-points-swiper-container', {
          slidesPerView: slidesview,
          spaceBetween: 15,
          autoHeight: true,
Severity: Major
Found in tribute_files/main.js and 1 other location - About 3 hrs to fix
tribute_files/main.js on lines 179..212

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 97.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    if(slideNumber  > 3) {
      var parkFeatureswiper = new Swiper('.park-features-swiper-container', {
         slidesPerView: slidesview,
          spaceBetween: 15,
          autoHeight: true,
Severity: Major
Found in tribute_files/main.js and 1 other location - About 3 hrs to fix
tribute_files/main.js on lines 472..503

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 97.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                    case 'begin_date':
                      (newURL[0].slice(-1) == '=') ? resultsForString += 'Programs' : resultsForString += ' programs';
                      resultsForString += ' starting on ' + newURL[j].split('=')[1];
                      sameDay.push(newURL[j].split('=')[1]);
                      break;
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
tribute_files/insivia-frmp-script.js on lines 2948..2952

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 94.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                    case 'end_date':
                      (newURL[4].slice(-1) == '=') ? resultsForString += 'Programs' : resultsForString += ' and';
                      resultsForString +=' ending by ' + newURL[j].split('=')[1]; 
                      sameDay.push(newURL[j].split('=')[1]);                           
                      break;
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
tribute_files/insivia-frmp-script.js on lines 2943..2947

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 94.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            } else {
                jQuery('.submenu-category-list > li[data-page-id]').each(function(){
                    var postID = jQuery(this).attr('data-page-id');
                    var link = jQuery(this).children('a');
                    if(!jQuery('body').hasClass(postID)) {
Severity: Major
Found in tribute_files/navigation.js and 1 other location - About 2 hrs to fix
tribute_files/navigation.js on lines 234..242

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 93.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            if(isMobile) {
                jQuery('.submenu-category-list > li[data-id]').each(function(){
                    var postID = jQuery(this).attr('data-id');
                    var link = jQuery(this).children('a');
                    if(!jQuery('body').hasClass(postID)) {
Severity: Major
Found in tribute_files/navigation.js and 1 other location - About 2 hrs to fix
tribute_files/navigation.js on lines 242..250

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 93.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                        programCartItems += '<li data-id="'+promises[i].responseJSON.cart[i].program_id+'" data-item-id="'+promises[i].responseJSON.cart[j].cart_item_id+'" class="cart-item insivia-frmp-row"><a href="/programs-events-finder/?id='+promises[i].responseJSON.cart[j].program_id+'&api=programs&type=program" class="blue cart-item-link">'+promises[i].responseJSON.cart[j].program_title+'</a><span class="item-info insivia-frmp-row"><span class="cart-item-date">'+cartItemDisplayDay+', '+monthsArray[ new Date(promises[i].responseJSON.cart[j].start_date).getMonth() ]+' '+cartItemDate+', '+new Date(promises[i].responseJSON.cart[j].start_date).getFullYear()+'</span><span class="cart-item-time"><span class="start-time">'+cartItemStart+'</span> to <span class="end-time">'+cartItemEnd+'</span></span>'+
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
tribute_files/insivia-frmp-script.js on lines 3725..3726

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 86.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language