mambax7/extgallery

View on GitHub
assets/js/galleria/galleria-1.1.js

Summary

Maintainability
F
2 wks
Test Coverage

File galleria-1.1.js has 2189 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Galleria v 1.2 prerelease 1.1 2010-10-29
 * http://galleria.aino.se
 *
 * Copyright (c) 2010, Aino
Severity: Major
Found in assets/js/galleria/galleria-1.1.js - About 6 days to fix

    Function Utils has 212 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        Utils = (function() {
    
            return {
    
                array : function( obj ) {
    Severity: Major
    Found in assets/js/galleria/galleria-1.1.js - About 1 day to fix

      Function _init has 175 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _init: function() {
              var self = this;
      
              if ( this._initialized ) {
                  Galleria.raise( 'Init failed: Gallery instance already initialized.' );
      Severity: Major
      Found in assets/js/galleria/galleria-1.1.js - About 7 hrs to fix

        Function _show has 107 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _show : function() {
        
                // shortcuts
                var self   = this,
                    queue  = this._queue[ 0 ],
        Severity: Major
        Found in assets/js/galleria/galleria-1.1.js - About 4 hrs to fix

          Function _run has 106 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _run : function() {
                  // shortcuts
                  var self = this,
                      o = this._options,
          
          
          Severity: Major
          Found in assets/js/galleria/galleria-1.1.js - About 4 hrs to fix

            Function scale has 96 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                scale: function( options ) {
            
                    // extend some defaults
                    options = $.extend({
                        width: 0,
            Severity: Major
            Found in assets/js/galleria/galleria-1.1.js - About 3 hrs to fix

              Function init has 75 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  init: function( target, options ) {
              
                      var self = this;
              
                      // save the instance
              Severity: Major
              Found in assets/js/galleria/galleria-1.1.js - About 3 hrs to fix

                Function loadCSS has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                            loadCSS : function( href, id, callback ) {
                
                                var link,
                                    ready = false,
                                    length;
                Severity: Major
                Found in assets/js/galleria/galleria-1.1.js - About 2 hrs to fix

                  Function success has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                              success: function() {
                                  // calculate some cropping
                                  var newWidth = ( width - options.margin * 2 ) / self.original.width,
                                      newHeight = ( height - options.margin * 2 ) / self.original.height,
                                      cropMap = {
                  Severity: Major
                  Found in assets/js/galleria/galleria-1.1.js - About 2 hrs to fix

                    Function addPan has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        addPan : function( img ) {
                    
                            if ( this._options.image_crop === false ) {
                                return;
                            }
                    Severity: Major
                    Found in assets/js/galleria/galleria-1.1.js - About 2 hrs to fix

                      Function init has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              init : function() {
                      
                                  // trigger the event
                                  self.trigger( Galleria.LIGHTBOX_OPEN );
                      
                      
                      Severity: Major
                      Found in assets/js/galleria/galleria-1.1.js - About 2 hrs to fix

                        Function load has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            load : function( source, selector, config ) {
                        
                                var self = this;
                        
                                // empty the data array
                        Severity: Minor
                        Found in assets/js/galleria/galleria-1.1.js - About 1 hr to fix

                          Function complete has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  var complete = function() {
                          
                                      // remove stalled
                                      self._queue.stalled = false;
                          
                          
                          Severity: Minor
                          Found in assets/js/galleria/galleria-1.1.js - About 1 hr to fix

                            Function enter has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    enter: function(callback) {
                            
                                        // hide the image until rescale is complete
                                        Utils.hide( self.getActiveImage() );
                            
                            
                            Severity: Minor
                            Found in assets/js/galleria/galleria-1.1.js - About 1 hr to fix

                              Function bind has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      bind: function( elem, value ) {
                              
                                          if (! tooltip.initialized ) {
                                              tooltip.init();
                                          }
                              Severity: Minor
                              Found in assets/js/galleria/galleria-1.1.js - About 1 hr to fix

                                Function loadTheme has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                Galleria.loadTheme = function( src, options ) {
                                
                                    var loaded = false,
                                        length = _galleries.length;
                                
                                
                                Severity: Minor
                                Found in assets/js/galleria/galleria-1.1.js - About 1 hr to fix

                                  Function rescale has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          rescale: function(event) {
                                  
                                              // calculate
                                              var width = Math.min( $(window).width(), lightbox.width ),
                                                  height = Math.min( $(window).height(), lightbox.height ),
                                  Severity: Minor
                                  Found in assets/js/galleria/galleria-1.1.js - About 1 hr to fix

                                    Function fadeslide has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            fadeslide: function(params, complete) {
                                    
                                                var x = 0,
                                                    easing = this.getOptions('easing');
                                    
                                    
                                    Severity: Minor
                                    Found in assets/js/galleria/galleria-1.1.js - About 1 hr to fix

                                      Function bindControls has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              bindControls: function() {
                                      
                                                  carousel.next.bind( CLICK(), function(e) {
                                                      e.preventDefault();
                                      
                                      
                                      Severity: Minor
                                      Found in assets/js/galleria/galleria-1.1.js - About 1 hr to fix

                                        Function complete has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                        complete: function( next ) {
                                        
                                                            Utils.show( next.container );
                                        
                                                            // toggle low quality for IE
                                        Severity: Minor
                                        Found in assets/js/galleria/galleria-1.1.js - About 1 hr to fix

                                          Function galleriaOut has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                          Open

                                            galleriaOut: function (_, t, b, c, d) {
                                          Severity: Minor
                                          Found in assets/js/galleria/galleria-1.1.js - About 35 mins to fix

                                            Function galleriaIn has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                            Open

                                                galleriaIn: function (_, t, b, c, d) {
                                            Severity: Minor
                                            Found in assets/js/galleria/galleria-1.1.js - About 35 mins to fix

                                              Function galleria has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                              Open

                                                  galleria: function (_, t, b, c, d) {
                                              Severity: Minor
                                              Found in assets/js/galleria/galleria-1.1.js - About 35 mins to fix

                                                TODO found
                                                Open

                                                                // TODO this should be properly tested in Opera
                                                Severity: Minor
                                                Found in assets/js/galleria/galleria-1.1.js by fixme

                                                TODO found
                                                Open

                                                    // TODO occational event conflicts
                                                Severity: Minor
                                                Found in assets/js/galleria/galleria-1.1.js by fixme

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

                                                Galleria.Picture = function( id ) {
                                                
                                                    // save the id
                                                    this.id = id || null;
                                                
                                                
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 2 other locations - About 6 hrs to fix
                                                assets/js/galleria/galleria-1.3.3.js on lines 6017..6046
                                                assets/js/galleria/galleria-1.3.5.js on lines 6038..6067

                                                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 166.

                                                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

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

                                                    jQuery : function( str ) {
                                                
                                                        var self = this,
                                                            ret = [];
                                                
                                                
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 2 other locations - About 6 hrs to fix
                                                assets/js/galleria/galleria-1.3.3.js on lines 5497..5518
                                                assets/js/galleria/galleria-1.3.5.js on lines 5518..5539

                                                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 163.

                                                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

                                                            self.rescale(function() {
                                                
                                                                Utils.addTimer('fullscreen_enter', function() {
                                                                    // show the image after 50 ms
                                                                    Utils.show( self.getActiveImage() );
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 1 other location - About 2 hrs to fix
                                                assets/js/galleria/galleria-1.1.js on lines 985..998

                                                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 92.

                                                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

                                                            self.rescale(function() {
                                                                Utils.addTimer('fullscreen_exit', function() {
                                                
                                                                    // show the image after 50 ms
                                                                    Utils.show( self.getActiveImage() );
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 1 other location - About 2 hrs to fix
                                                assets/js/galleria/galleria-1.1.js on lines 945..958

                                                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 92.

                                                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

                                                Galleria.get = function( index ) {
                                                    if ( !!_galleries[ index ] ) {
                                                        return _galleries[ index ];
                                                    } else if ( typeof index !== 'number' ) {
                                                        return _galleries;
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 2 other locations - About 2 hrs to fix
                                                assets/js/galleria/galleria-1.3.3.js on lines 5746..5754
                                                assets/js/galleria/galleria-1.3.5.js on lines 5767..5775

                                                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 83.

                                                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

                                                    getMousePosition : function(e) {
                                                        return {
                                                            x: e.pageX - this.$( 'stage' ).offset().left,
                                                            y: e.pageY - this.$( 'stage' ).offset().top
                                                        };
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 2 other locations - About 2 hrs to fix
                                                assets/js/galleria/galleria-1.3.3.js on lines 4283..4288
                                                assets/js/galleria/galleria-1.3.5.js on lines 4301..4306

                                                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 81.

                                                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

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

                                                            $.each(elems.split(' '), function( i, elemId ) {
                                                                self.addElement( 'lightbox-' + elemId );
                                                                el[ elemId ] = lightbox.elems[ elemId ] = self.get( 'lightbox-' + elemId );
                                                            });
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 2 other locations - About 2 hrs to fix
                                                assets/js/galleria/galleria-1.3.3.js on lines 2199..2202
                                                assets/js/galleria/galleria-1.3.5.js on lines 2209..2212

                                                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 81.

                                                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

                                                    addElement : function( id ) {
                                                
                                                        var dom = this._dom;
                                                
                                                        $.each( Utils.array(arguments), function( i, blueprint ) {
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 2 other locations - About 2 hrs to fix
                                                assets/js/galleria/galleria-1.3.3.js on lines 4439..4448
                                                assets/js/galleria/galleria-1.3.5.js on lines 4457..4466

                                                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 77.

                                                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

                                                    getPrev : function( base ) {
                                                        base = typeof base == 'number' ? base : this.getIndex();
                                                        return base === 0 ? this.getDataLength() - 1 : base - 1;
                                                    },
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 2 other locations - About 1 hr to fix
                                                assets/js/galleria/galleria-1.3.3.js on lines 5158..5161
                                                assets/js/galleria/galleria-1.3.5.js on lines 5179..5182

                                                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 67.

                                                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

                                                    getNext : function( base ) {
                                                        base = typeof base == 'number' ? base : this.getIndex();
                                                        return base == this.getDataLength() - 1 ? 0 : base + 1;
                                                    },
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 2 other locations - About 1 hr to fix
                                                assets/js/galleria/galleria-1.3.3.js on lines 5145..5148
                                                assets/js/galleria/galleria-1.3.5.js on lines 5166..5169

                                                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 67.

                                                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

                                                    setOptions : function( key, value ) {
                                                        if ( typeof key == 'object' ) {
                                                            $.extend( this._options, key );
                                                        } else {
                                                            this._options[ key ] = value;
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 2 other locations - About 1 hr to fix
                                                assets/js/galleria/galleria-1.3.3.js on lines 5279..5286
                                                assets/js/galleria/galleria-1.3.5.js on lines 5300..5307

                                                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 65.

                                                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

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

                                                    $.each( spans.split(' '), function( i, elemId ) {
                                                        self._dom[ elemId ] = Utils.create( 'galleria-' + elemId, 'span' );
                                                    });
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 2 other locations - About 1 hr to fix
                                                assets/js/galleria/galleria-1.3.3.js on lines 1178..1180
                                                assets/js/galleria/galleria-1.3.5.js on lines 1178..1180

                                                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 58.

                                                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

                                                  galleriaOut: function (_, t, b, c, d) {
                                                    return -c * ((t=t/d-1)*t*t*t - 1) + b;
                                                  }
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 1 other location - About 1 hr to fix
                                                assets/js/galleryview/easing.js on lines 71..73

                                                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 56.

                                                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

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

                                                    $.each( divs.split(' '), function( i, elemId ) {
                                                        self._dom[ elemId ] = Utils.create( 'galleria-' + elemId );
                                                    });
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 2 other locations - About 55 mins to fix
                                                assets/js/galleria/galleria-1.3.3.js on lines 1174..1176
                                                assets/js/galleria/galleria-1.3.5.js on lines 1174..1176

                                                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 54.

                                                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 6 locations. Consider refactoring.
                                                Open

                                                    prev : function() {
                                                        if ( this.getDataLength() > 1 ) {
                                                            this.show( this.getPrev(), true );
                                                        }
                                                        return this;
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 5 other locations - About 50 mins to fix
                                                assets/js/galleria/galleria-1.1.js on lines 2841..2846
                                                assets/js/galleria/galleria-1.3.3.js on lines 5169..5174
                                                assets/js/galleria/galleria-1.3.3.js on lines 5182..5187
                                                assets/js/galleria/galleria-1.3.5.js on lines 5190..5195
                                                assets/js/galleria/galleria-1.3.5.js on lines 5203..5208

                                                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 52.

                                                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 6 locations. Consider refactoring.
                                                Open

                                                    next : function() {
                                                        if ( this.getDataLength() > 1 ) {
                                                            this.show( this.getNext(), false );
                                                        }
                                                        return this;
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 5 other locations - About 50 mins to fix
                                                assets/js/galleria/galleria-1.1.js on lines 2854..2859
                                                assets/js/galleria/galleria-1.3.3.js on lines 5169..5174
                                                assets/js/galleria/galleria-1.3.3.js on lines 5182..5187
                                                assets/js/galleria/galleria-1.3.5.js on lines 5190..5195
                                                assets/js/galleria/galleria-1.3.5.js on lines 5203..5208

                                                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 52.

                                                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

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

                                                        $( self._thumbnails[ queue.index ].container )
                                                            .addClass( 'active' )
                                                            .siblings( '.active' )
                                                            .removeClass( 'active' );
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 2 other locations - About 50 mins to fix
                                                assets/js/galleria/galleria-1.3.3.js on lines 5033..5036
                                                assets/js/galleria/galleria-1.3.5.js on lines 5054..5057

                                                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 51.

                                                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

                                                    refreshImage : function() {
                                                        this._scaleImage();
                                                        if ( this._options.image_pan ) {
                                                            this.addPan();
                                                        }
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 2 other locations - About 45 mins to fix
                                                assets/js/galleria/galleria-1.3.3.js on lines 4722..4728
                                                assets/js/galleria/galleria-1.3.5.js on lines 4744..4750

                                                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 50.

                                                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

                                                        if ( this._options.carousel && this._options.carousel_follow ) {
                                                            this._carousel.follow( queue.index );
                                                        }
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 2 other locations - About 45 mins to fix
                                                assets/js/galleria/galleria-1.3.3.js on lines 5006..5008
                                                assets/js/galleria/galleria-1.3.5.js on lines 5041..5043

                                                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 50.

                                                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

                                                    getData : function( index ) {
                                                        return index in this._data ?
                                                            this._data[ index ] : this._data[ this._active ];
                                                    },
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 2 other locations - About 45 mins to fix
                                                assets/js/galleria/galleria-1.3.3.js on lines 5210..5213
                                                assets/js/galleria/galleria-1.3.5.js on lines 5231..5234

                                                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 50.

                                                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

                                                    remove : function( elemID ) {
                                                        this.$( Utils.array( arguments ).join(',') ).remove();
                                                        return this;
                                                    },
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 2 other locations - About 45 mins to fix
                                                assets/js/galleria/galleria-1.3.3.js on lines 4530..4533
                                                assets/js/galleria/galleria-1.3.5.js on lines 4548..4551

                                                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 50.

                                                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 7 locations. Consider refactoring.
                                                Open

                                                    defineTooltip: function( elem, value ) {
                                                        this._tooltip.define.apply( this._tooltip, Utils.array(arguments) );
                                                        return this;
                                                    },
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 6 other locations - About 40 mins to fix
                                                assets/js/galleria/galleria-1.1.js on lines 2070..2073
                                                assets/js/galleria/galleria-1.1.js on lines 2150..2153
                                                assets/js/galleria/galleria-1.3.3.js on lines 4178..4181
                                                assets/js/galleria/galleria-1.3.3.js on lines 4195..4198
                                                assets/js/galleria/galleria-1.3.5.js on lines 4196..4199
                                                assets/js/galleria/galleria-1.3.5.js on lines 4213..4216

                                                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 49.

                                                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 7 locations. Consider refactoring.
                                                Open

                                                    bindTooltip: function( elem, value ) {
                                                        this._tooltip.bind.apply( this._tooltip, Utils.array(arguments) );
                                                        return this;
                                                    },
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 6 other locations - About 40 mins to fix
                                                assets/js/galleria/galleria-1.1.js on lines 2070..2073
                                                assets/js/galleria/galleria-1.1.js on lines 2165..2168
                                                assets/js/galleria/galleria-1.3.3.js on lines 4178..4181
                                                assets/js/galleria/galleria-1.3.3.js on lines 4195..4198
                                                assets/js/galleria/galleria-1.3.5.js on lines 4196..4199
                                                assets/js/galleria/galleria-1.3.5.js on lines 4213..4216

                                                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 49.

                                                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 7 locations. Consider refactoring.
                                                Open

                                                    addIdleState: function( elem, styles ) {
                                                        this._idle.add.apply( this._idle, Utils.array( arguments ) );
                                                        return this;
                                                    },
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 6 other locations - About 40 mins to fix
                                                assets/js/galleria/galleria-1.1.js on lines 2150..2153
                                                assets/js/galleria/galleria-1.1.js on lines 2165..2168
                                                assets/js/galleria/galleria-1.3.3.js on lines 4178..4181
                                                assets/js/galleria/galleria-1.3.3.js on lines 4195..4198
                                                assets/js/galleria/galleria-1.3.5.js on lines 4196..4199
                                                assets/js/galleria/galleria-1.3.5.js on lines 4213..4216

                                                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 49.

                                                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

                                                        this._target = this._dom.target = target.nodeName ? target : $( target ).get(0);
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 2 other locations - About 40 mins to fix
                                                assets/js/galleria/galleria-1.3.3.js on lines 2522..2522
                                                assets/js/galleria/galleria-1.3.5.js on lines 2532..2532

                                                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 49.

                                                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 8 locations. Consider refactoring.
                                                Open

                                                    removeIdleState: function( elem ) {
                                                        this._idle.remove.apply( this._idle, Utils.array( arguments ) );
                                                        return this;
                                                    },
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 7 other locations - About 40 mins to fix
                                                assets/js/galleria/galleria-1.1.js on lines 2422..2425
                                                assets/js/galleria/galleria-1.3.3.js on lines 4098..4101
                                                assets/js/galleria/galleria-1.3.3.js on lines 4209..4212
                                                assets/js/galleria/galleria-1.3.3.js on lines 4469..4472
                                                assets/js/galleria/galleria-1.3.5.js on lines 4116..4119
                                                assets/js/galleria/galleria-1.3.5.js on lines 4227..4230
                                                assets/js/galleria/galleria-1.3.5.js on lines 4487..4490

                                                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 48.

                                                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 8 locations. Consider refactoring.
                                                Open

                                                    attachKeyboard : function( map ) {
                                                        this._keyboard.attach.apply( this._keyboard, Utils.array( arguments ) );
                                                        return this;
                                                    },
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 7 other locations - About 40 mins to fix
                                                assets/js/galleria/galleria-1.1.js on lines 2083..2086
                                                assets/js/galleria/galleria-1.3.3.js on lines 4098..4101
                                                assets/js/galleria/galleria-1.3.3.js on lines 4209..4212
                                                assets/js/galleria/galleria-1.3.3.js on lines 4469..4472
                                                assets/js/galleria/galleria-1.3.5.js on lines 4116..4119
                                                assets/js/galleria/galleria-1.3.5.js on lines 4227..4230
                                                assets/js/galleria/galleria-1.3.5.js on lines 4487..4490

                                                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 48.

                                                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 6 locations. Consider refactoring.
                                                Open

                                                    appendChild : function( parentID, childID ) {
                                                        this.$( parentID ).append( this.get( childID ) || childID );
                                                        return this;
                                                    },
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 5 other locations - About 40 mins to fix
                                                assets/js/galleria/galleria-1.1.js on lines 2469..2472
                                                assets/js/galleria/galleria-1.3.3.js on lines 4497..4500
                                                assets/js/galleria/galleria-1.3.3.js on lines 4516..4519
                                                assets/js/galleria/galleria-1.3.5.js on lines 4515..4518
                                                assets/js/galleria/galleria-1.3.5.js on lines 4534..4537

                                                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 48.

                                                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 6 locations. Consider refactoring.
                                                Open

                                                    prependChild : function( parenID, childID ) {
                                                        this.$( parentID ).prepend( this.get( childID ) || childID );
                                                        return this;
                                                    },
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 5 other locations - About 40 mins to fix
                                                assets/js/galleria/galleria-1.1.js on lines 2450..2453
                                                assets/js/galleria/galleria-1.3.3.js on lines 4497..4500
                                                assets/js/galleria/galleria-1.3.3.js on lines 4516..4519
                                                assets/js/galleria/galleria-1.3.5.js on lines 4515..4518
                                                assets/js/galleria/galleria-1.3.5.js on lines 4534..4537

                                                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 48.

                                                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 9 locations. Consider refactoring.
                                                Open

                                                    detachKeyboard : function() {
                                                        this._keyboard.detach.apply( this._keyboard, Utils.array( arguments ) );
                                                        return this;
                                                    },
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 8 other locations - About 35 mins to fix
                                                assets/js/galleria/galleria-1.1.js on lines 2184..2187
                                                assets/js/galleria/galleria-1.1.js on lines 2195..2198
                                                assets/js/galleria/galleria-1.3.3.js on lines 4221..4224
                                                assets/js/galleria/galleria-1.3.3.js on lines 4232..4235
                                                assets/js/galleria/galleria-1.3.3.js on lines 4480..4483
                                                assets/js/galleria/galleria-1.3.5.js on lines 4239..4242
                                                assets/js/galleria/galleria-1.3.5.js on lines 4250..4253
                                                assets/js/galleria/galleria-1.3.5.js on lines 4498..4501

                                                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 47.

                                                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 9 locations. Consider refactoring.
                                                Open

                                                    openLightbox: function() {
                                                        this._lightbox.show.apply( this._lightbox, Utils.array( arguments ) );
                                                        return this;
                                                    },
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 8 other locations - About 35 mins to fix
                                                assets/js/galleria/galleria-1.1.js on lines 2195..2198
                                                assets/js/galleria/galleria-1.1.js on lines 2433..2436
                                                assets/js/galleria/galleria-1.3.3.js on lines 4221..4224
                                                assets/js/galleria/galleria-1.3.3.js on lines 4232..4235
                                                assets/js/galleria/galleria-1.3.3.js on lines 4480..4483
                                                assets/js/galleria/galleria-1.3.5.js on lines 4239..4242
                                                assets/js/galleria/galleria-1.3.5.js on lines 4250..4253
                                                assets/js/galleria/galleria-1.3.5.js on lines 4498..4501

                                                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 47.

                                                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 9 locations. Consider refactoring.
                                                Open

                                                    closeLightbox: function() {
                                                        this._lightbox.hide.apply( this._lightbox, Utils.array( arguments ) );
                                                        return this;
                                                    },
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.1.js and 8 other locations - About 35 mins to fix
                                                assets/js/galleria/galleria-1.1.js on lines 2184..2187
                                                assets/js/galleria/galleria-1.1.js on lines 2433..2436
                                                assets/js/galleria/galleria-1.3.3.js on lines 4221..4224
                                                assets/js/galleria/galleria-1.3.3.js on lines 4232..4235
                                                assets/js/galleria/galleria-1.3.3.js on lines 4480..4483
                                                assets/js/galleria/galleria-1.3.5.js on lines 4239..4242
                                                assets/js/galleria/galleria-1.3.5.js on lines 4250..4253
                                                assets/js/galleria/galleria-1.3.5.js on lines 4498..4501

                                                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 47.

                                                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

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

                                                        this.$( 'images' ).css({
                                                            position: 'relative',
                                                            top: 0,
                                                            left: 0,
                                                            width: '100%',
                                                Severity: Minor
                                                Found in assets/js/galleria/galleria-1.1.js and 2 other locations - About 35 mins to fix
                                                assets/js/galleria/galleria-1.3.3.js on lines 2865..2871
                                                assets/js/galleria/galleria-1.3.5.js on lines 2879..2885

                                                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 47.

                                                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

                                                        removeEvent : function() {
                                                            idle.bound = false;
                                                            self.$('container').unbind('mousemove click', idle.showAll );
                                                        },
                                                Severity: Minor
                                                Found in assets/js/galleria/galleria-1.1.js and 1 other location - About 30 mins to fix
                                                assets/js/galleria/galleria-1.1.js on lines 1053..1056

                                                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 45.

                                                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

                                                        addEvent : function() {
                                                            idle.bound = true;
                                                            self.$('container').bind('mousemove click', idle.showAll );
                                                        },
                                                Severity: Minor
                                                Found in assets/js/galleria/galleria-1.1.js and 1 other location - About 30 mins to fix
                                                assets/js/galleria/galleria-1.1.js on lines 1058..1061

                                                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 45.

                                                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

                                                There are no issues that match your filters.

                                                Category
                                                Status