mambax7/extgallery

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

Summary

Maintainability
F
9 mos
Test Coverage

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

/**
 * Galleria v 1.3.5 2014-01-25
 * http://galleria.io
 *
 * Licensed under the MIT license
Severity: Major
Found in assets/js/galleria/galleria-1.3.5.js - About 1 wk to fix

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

        Utils = (function() {
    
            return {
    
                // legacy support for clearTimer
    Severity: Major
    Found in assets/js/galleria/galleria-1.3.5.js - About 2 days to fix

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

          _init: function() {
      
              var self = this,
                  options = this._options;
      
      
      Severity: Major
      Found in assets/js/galleria/galleria-1.3.5.js - About 1 day to fix

        Function Finger has 195 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Galleria.Finger = (function() {
        
            var abs = M.abs;
        
            // test for translate3d support
        Severity: Major
        Found in assets/js/galleria/galleria-1.3.5.js - About 7 hrs to fix

          Function _show has 182 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.3.5.js - About 7 hrs to fix

            Function _createThumbnails has 177 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                _createThumbnails : function( push ) {
            
                    this.get( 'total' ).innerHTML = this.getDataLength();
            
                    var src,
            Severity: Major
            Found in assets/js/galleria/galleria-1.3.5.js - About 7 hrs to fix

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

                  scale: function( options ) {
              
                      var self = this;
              
                      // extend some defaults
              Severity: Major
              Found in assets/js/galleria/galleria-1.3.5.js - About 6 hrs to fix

                Function _enter has 136 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        _enter: function( callback ) {
                
                            fullscreen.active = true;
                
                            if ( IFRAME ) {
                Severity: Major
                Found in assets/js/galleria/galleria-1.3.5.js - About 5 hrs to fix

                  Function _transitions has 128 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _transitions = (function() {
                  
                          var _slide = function(params, complete, fade, door) {
                  
                              var easing = this.getOptions('easing'),
                  Severity: Major
                  Found in assets/js/galleria/galleria-1.3.5.js - About 5 hrs to fix

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

                        init: function( target, options ) {
                    
                            options = _legacyOptions( options );
                    
                            // save the original ingredients
                    Severity: Major
                    Found in assets/js/galleria/galleria-1.3.5.js - About 4 hrs to fix

                      Function animate has 118 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  animate : (function() {
                      
                                      // detect transition
                                      var transition = (function( style ) {
                                          var props = 'transition WebkitTransition MozTransition OTransition'.split(' '),
                      Severity: Major
                      Found in assets/js/galleria/galleria-1.3.5.js - About 4 hrs to fix

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

                            load: function(src, size, callback) {
                        
                                if ( typeof size == 'function' ) {
                                    callback = size;
                                    size = null;
                        Severity: Major
                        Found in assets/js/galleria/galleria-1.3.5.js - About 4 hrs to fix

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

                              _run : function() {
                          
                                  var self = this;
                          
                                  self._createThumbnails();
                          Severity: Major
                          Found in assets/js/galleria/galleria-1.3.5.js - About 3 hrs to fix

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

                                    init : function() {
                            
                                        if ( lightbox.initialized ) {
                                            return;
                                        }
                            Severity: Major
                            Found in assets/js/galleria/galleria-1.3.5.js - About 3 hrs to fix

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

                                      var complete = (function( data, next, active, queue, thumb ) {
                              
                                          return function() {
                              
                                              var win;
                              Severity: Major
                              Found in assets/js/galleria/galleria-1.3.5.js - About 3 hrs to fix

                                Function show has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        show: function(index) {
                                
                                            lightbox.active = index = typeof index === 'number' ? index : self.getIndex() || 0;
                                
                                            if ( !lightbox.initialized ) {
                                Severity: Major
                                Found in assets/js/galleria/galleria-1.3.5.js - About 3 hrs to fix

                                  Function success has 83 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,
                                  Severity: Major
                                  Found in assets/js/galleria/galleria-1.3.5.js - About 3 hrs to fix

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

                                                success: function() {
                                    
                                                    // save the instance
                                                    _galleries.push( self );
                                    
                                    
                                    Severity: Major
                                    Found in assets/js/galleria/galleria-1.3.5.js - About 3 hrs to fix

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

                                          show : function( index, rewind, _history ) {
                                      
                                              var swipe = this._options.swipe;
                                      
                                              // do nothing queue is long || index is false || queue is false and transition is in progress
                                      Severity: Major
                                      Found in assets/js/galleria/galleria-1.3.5.js - About 3 hrs to fix

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

                                            load : function( source, selector, config ) {
                                        
                                                var self = this,
                                                    o = this._options;
                                        
                                        
                                        Severity: Major
                                        Found in assets/js/galleria/galleria-1.3.5.js - About 2 hrs to fix

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

                                              _parseData : function( callback ) {
                                          
                                                  var self = this,
                                                      current,
                                                      ready = false,
                                          Severity: Major
                                          Found in assets/js/galleria/galleria-1.3.5.js - About 2 hrs to fix

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

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

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

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

                                                Function Finger has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                    var Finger = function(elem, options) {
                                                
                                                        // default options
                                                        this.config = {
                                                            start: 0,
                                                Severity: Major
                                                Found in assets/js/galleria/galleria-1.3.5.js - About 2 hrs to fix

                                                  Function _exit has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                          _exit: function( callback ) {
                                                  
                                                              fullscreen.active = false;
                                                  
                                                              var inBrowser = !self._options.trueFullscreen || !_nativeFullscreen.support,
                                                  Severity: Minor
                                                  Found in assets/js/galleria/galleria-1.3.5.js - About 2 hrs to fix

                                                    Function addTheme has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                    Galleria.addTheme = function( theme ) {
                                                    
                                                        // make sure we have a name
                                                        if ( !theme.name ) {
                                                            Galleria.raise('No theme name specified');
                                                    Severity: Minor
                                                    Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

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

                                                                      complete: function( next ) {
                                                      
                                                                          // toggle low quality for IE
                                                                          if ( 'image' in active ) {
                                                                              Utils.toggleQuality( active.image, false );
                                                      Severity: Minor
                                                      Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

                                                        Function _slide has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                                var _slide = function(params, complete, fade, door) {
                                                        
                                                                    var easing = this.getOptions('easing'),
                                                                        distance = this.getStageWidth(),
                                                                        from = { left: distance * ( params.rewind ? -1 : 1 ) },
                                                        Severity: Minor
                                                        Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

                                                          Function onload has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                                      onload = (function( self, callback, src ) {
                                                          
                                                                          return function() {
                                                          
                                                                              var complete = function() {
                                                          Severity: Minor
                                                          Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

                                                            Function onThumbLoad has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                                        onThumbLoad = function( thumb, callback ) {
                                                            
                                                                            // scale when ready
                                                                            thumb.scale({
                                                                                width:    thumb.data.width,
                                                            Severity: Minor
                                                            Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

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

                                                                      bind: function( elem, value ) {
                                                              
                                                                          // todo: revise if alternative tooltip is needed for mobile devices
                                                                          if (Galleria.TOUCH) {
                                                                              return;
                                                              Severity: Minor
                                                              Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

                                                                Function raise has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                Open

                                                                Galleria.raise = function( msg, fatal ) {
                                                                
                                                                    var type = fatal ? 'Fatal error' : 'Error',
                                                                
                                                                        css = {
                                                                Severity: Minor
                                                                Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

                                                                  Function _scaleImage has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                  Open

                                                                      _scaleImage : function( image, options ) {
                                                                  
                                                                          image = image || this._controls.getActive();
                                                                  
                                                                          // janpub (JH) fix:
                                                                  Severity: Minor
                                                                  Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

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

                                                                            enter: function( callback ) {
                                                                    
                                                                                fullscreen.beforeEnter(function() {
                                                                    
                                                                                    callback = fullscreen.parseCallback( callback, true );
                                                                    Severity: Minor
                                                                    Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

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

                                                                          rescale : function( width, height, complete ) {
                                                                      
                                                                              var self = this;
                                                                      
                                                                              // allow rescale(fn)
                                                                      Severity: Minor
                                                                      Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

                                                                        Function Video has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                        Open

                                                                            Video = function( type, id ) {
                                                                        
                                                                                for( var i=0; i<_video._inst.length; i++ ) {
                                                                                    if ( _video._inst[i].id === id && _video._inst[i].type == type ) {
                                                                                        return _video._inst[i];
                                                                        Severity: Minor
                                                                        Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

                                                                          Function loop has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                          Open

                                                                                  loop: function() {
                                                                          
                                                                                      var distance = this.to - this.pos,
                                                                                          factor = 1;
                                                                          
                                                                          
                                                                          Severity: Minor
                                                                          Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

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

                                                                                                complete: function( thumb ) {
                                                                            
                                                                                                    // shrink thumbnails to fit
                                                                                                    var top = ['left', 'top'],
                                                                                                        arr = ['Width', 'Height'],
                                                                            Severity: Minor
                                                                            Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

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

                                                                                      add: function(elem, to, from, hide) {
                                                                                          if ( !elem || Galleria.TOUCH ) {
                                                                                              return;
                                                                                          }
                                                                                          if (!idle.bound) {
                                                                              Severity: Minor
                                                                              Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

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

                                                                                        rescale: function(event) {
                                                                                
                                                                                            // calculate
                                                                                             var width = M.min( $win.width()-40, lightbox.width ),
                                                                                                height = M.min( $win.height()-60, lightbox.height ),
                                                                                Severity: Minor
                                                                                Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

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

                                                                                          bindControls: function() {
                                                                                  
                                                                                              var i;
                                                                                  
                                                                                              carousel.next.on( 'click:fast', function(e) {
                                                                                  Severity: Minor
                                                                                  Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

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

                                                                                        add: function(handleObj) {
                                                                                            var prop = this.propagate;
                                                                                            if ( Galleria.TOUCH ) {
                                                                                                $(this).on('touchstart.fast', function start(e) {
                                                                                                    var ev = e.originalEvent,
                                                                                    Severity: Minor
                                                                                    Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

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

                                                                                      $.fn.galleria = function( options ) {
                                                                                      
                                                                                          var selector = this.selector;
                                                                                      
                                                                                          // try domReady if element not found
                                                                                      Severity: Minor
                                                                                      Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

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

                                                                                                    show : function( elem, speed, callback ) {
                                                                                        
                                                                                                        callback = callback || F;
                                                                                        
                                                                                                        var $elem = $(elem);
                                                                                        Severity: Minor
                                                                                        Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

                                                                                          Function _getWH has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                          Open

                                                                                              _getWH : function() {
                                                                                          
                                                                                                  var $container = this.$( 'container' ),
                                                                                                      $target = this.$( 'target' ),
                                                                                                      self = this,
                                                                                          Severity: Minor
                                                                                          Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

                                                                                            Function lazyLoadChunks has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                            Open

                                                                                                lazyLoadChunks: function( size, delay ) {
                                                                                            
                                                                                                    var len = this.getDataLength(),
                                                                                                        i = 0,
                                                                                                        n = 0,
                                                                                            Severity: Minor
                                                                                            Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

                                                                                              Function hide has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                              Open

                                                                                                          hide : function( elem, speed, callback ) {
                                                                                              
                                                                                                              callback = callback || F;
                                                                                              
                                                                                                              var $elem = $(elem);
                                                                                              Severity: Minor
                                                                                              Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

                                                                                                Function _playCheck has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                Open

                                                                                                    _playCheck : function() {
                                                                                                        var self = this,
                                                                                                            played = 0,
                                                                                                            interval = 20,
                                                                                                            now = Utils.timestamp(),
                                                                                                Severity: Minor
                                                                                                Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

                                                                                                  Function flash has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                  Open

                                                                                                                  flash: function(params, complete) {
                                                                                                                      $(params.next).css({
                                                                                                                          opacity: 0,
                                                                                                                          left: 0
                                                                                                                      });
                                                                                                  Severity: Minor
                                                                                                  Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

                                                                                                    Function wait has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                                                                                    Open

                                                                                                                wait : function(options) {
                                                                                                    
                                                                                                                    Galleria._waiters = Galleria._waiters || [];
                                                                                                    
                                                                                                                    options = $.extend({
                                                                                                    Severity: Minor
                                                                                                    Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

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

                                                                                                              var scale = function() {
                                                                                                      
                                                                                                                  // set stagewidth
                                                                                                                  self._stageWidth = width || self.$( 'stage' ).width();
                                                                                                                  self._stageHeight = height || self.$( 'stage' ).height();
                                                                                                      Severity: Minor
                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js - About 1 hr to fix

                                                                                                        Avoid deeply nested control flow statements.
                                                                                                        Open

                                                                                                                                                if ( type == 'image' && !current.big ) {
                                                                                                                                                    current.big = current.image;
                                                                                                                                                }
                                                                                                        Severity: Major
                                                                                                        Found in assets/js/galleria/galleria-1.3.5.js - About 45 mins to fix

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

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

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

                                                                                                                    this.easeout = function (x, t, b, c, d) {
                                                                                                            Severity: Minor
                                                                                                            Found in assets/js/galleria/galleria-1.3.5.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.3.5.js - About 35 mins 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.3.5.js - About 35 mins to fix

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

                                                                                                                          var complete = (function( data, next, active, queue, thumb ) {
                                                                                                                  Severity: Minor
                                                                                                                  Found in assets/js/galleria/galleria-1.3.5.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.3.5.js - About 35 mins to fix

                                                                                                                      TODO found
                                                                                                                      Open

                                                                                                                                          // TODO: rethink if this is necessary
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js by fixme

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

                                                                                                                      var doc    = window.document,
                                                                                                                          $doc   = $( doc ),
                                                                                                                          $win   = $( window ),
                                                                                                                      
                                                                                                                      // native prototypes
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 mo to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 15..1050

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

                                                                                                                      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

                                                                                                                      Galleria.Picture.prototype = {
                                                                                                                      
                                                                                                                          // the inherited cache object
                                                                                                                          cache: {},
                                                                                                                      
                                                                                                                      
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 2 wks to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 6048..6481

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

                                                                                                                      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

                                                                                                                          _createThumbnails : function( push ) {
                                                                                                                      
                                                                                                                              this.get( 'total' ).innerHTML = this.getDataLength();
                                                                                                                      
                                                                                                                              var src,
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 wk to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 3184..3459

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

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

                                                                                                                          var carousel = this._carousel = {
                                                                                                                      
                                                                                                                              // shortcuts
                                                                                                                              next: self.$('thumb-nav-right'),
                                                                                                                              prev: self.$('thumb-nav-left'),
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 wk to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 1264..1428

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

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

                                                                                                                          var tooltip = this._tooltip = {
                                                                                                                      
                                                                                                                              initialized : false,
                                                                                                                      
                                                                                                                              open: false,
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 wk to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 1432..1595

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

                                                                                                                      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

                                                                                                                          _run : function() {
                                                                                                                      
                                                                                                                              var self = this;
                                                                                                                      
                                                                                                                              self._createThumbnails();
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 wk to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 3553..3716

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

                                                                                                                      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

                                                                                                                              show: function(index) {
                                                                                                                      
                                                                                                                                  lightbox.active = index = typeof index === 'number' ? index : self.getIndex() || 0;
                                                                                                                      
                                                                                                                                  if ( !lightbox.initialized ) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 wk to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2333..2445

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

                                                                                                                      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

                                                                                                                              var complete = (function( data, next, active, queue, thumb ) {
                                                                                                                      
                                                                                                                                  return function() {
                                                                                                                      
                                                                                                                                      var win;
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 6 days to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4869..5003

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

                                                                                                                      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

                                                                                                                          load : function( source, selector, config ) {
                                                                                                                      
                                                                                                                              var self = this,
                                                                                                                                  o = this._options;
                                                                                                                      
                                                                                                                      
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 5 days to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 3734..3843

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

                                                                                                                      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

                                                                                                                          addPan : function( img ) {
                                                                                                                      
                                                                                                                              if ( this._options.imageCrop === false ) {
                                                                                                                                  return;
                                                                                                                              }
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 4 days to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4298..4387

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

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

                                                                                                                              _exit: function( callback ) {
                                                                                                                      
                                                                                                                                  fullscreen.active = false;
                                                                                                                      
                                                                                                                                  var inBrowser = !self._options.trueFullscreen || !_nativeFullscreen.support,
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 4 days to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 1886..1965

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

                                                                                                                      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

                                                                                                                          _parseData : function( callback ) {
                                                                                                                      
                                                                                                                              var self = this,
                                                                                                                                  current,
                                                                                                                                  ready = false,
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 4 days to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 3846..3931

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

                                                                                                                      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

                                                                                                                          var Finger = function(elem, options) {
                                                                                                                      
                                                                                                                              // default options
                                                                                                                              this.config = {
                                                                                                                                  start: 0,
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 4 days to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 6546..6623

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

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

                                                                                                                              this.bind( Galleria.DATA, function() {
                                                                                                                      
                                                                                                                                  // remove big if total pixels are less than 1024 (most phones)
                                                                                                                                  if ( window.screen && window.screen.width && Array.prototype.forEach ) {
                                                                                                                      
                                                                                                                      
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 4 days to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2716..2789

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

                                                                                                                      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

                                                                                                                              next.load( src, function( next ) {
                                                                                                                      
                                                                                                                                  // add layer HTML
                                                                                                                                  var layer = $( self._layers[ 1-self._controls.active ] ).html( data.layer || '' ).hide();
                                                                                                                      
                                                                                                                      
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 3 days to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5053..5134

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

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

                                                                                                                          _scaleImage : function( image, options ) {
                                                                                                                      
                                                                                                                              image = image || this._controls.getActive();
                                                                                                                      
                                                                                                                              // janpub (JH) fix:
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 2 days to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4555..4606

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

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

                                                                                                                      Galleria.addTheme = function( theme ) {
                                                                                                                      
                                                                                                                          // make sure we have a name
                                                                                                                          if ( !theme.name ) {
                                                                                                                              Galleria.raise('No theme name specified');
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 2 days to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5587..5668

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

                                                                                                                      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

                                                                                                                                  this.bind( Galleria.IMAGE, function(e) {
                                                                                                                      
                                                                                                                                      self.setCounter( e.index );
                                                                                                                                      self.setInfo( e.index );
                                                                                                                      
                                                                                                                      
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 2 days to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2958..3006

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

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

                                                                                                                      $.event.special['click:fast'] = {
                                                                                                                          propagate: true,
                                                                                                                          add: function(handleObj) {
                                                                                                                              var prop = this.propagate;
                                                                                                                              if ( Galleria.TOUCH ) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 2 days to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 1056..1096

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

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

                                                                                                                              rescale: function(event) {
                                                                                                                      
                                                                                                                                  // calculate
                                                                                                                                   var width = M.min( $win.width()-40, lightbox.width ),
                                                                                                                                      height = M.min( $win.height()-60, lightbox.height ),
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 2 days to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2263..2301

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

                                                                                                                      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

                                                                                                                                  this.$('stage').on('click', function(e) {
                                                                                                                                      var data = self.getData();
                                                                                                                                      if ( !data ) {
                                                                                                                                          return;
                                                                                                                                      }
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 2 days to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2906..2957

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

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

                                                                                                                              enter: function( callback ) {
                                                                                                                      
                                                                                                                                  fullscreen.beforeEnter(function() {
                                                                                                                      
                                                                                                                                      callback = fullscreen.parseCallback( callback, true );
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 2 days to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 1634..1686

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

                                                                                                                      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

                                                                                                                      Galleria.raise = function( msg, fatal ) {
                                                                                                                      
                                                                                                                          var type = fatal ? 'Fatal error' : 'Error',
                                                                                                                      
                                                                                                                              css = {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 2 days to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5928..5983

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

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

                                                                                                                          var keyboard = this._keyboard = {
                                                                                                                      
                                                                                                                              keys : {
                                                                                                                                  'UP': 38,
                                                                                                                                  'DOWN': 40,
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 2 days to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 1184..1233

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

                                                                                                                      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

                                                                                                                              ontouchmove: function(e) {
                                                                                                                      
                                                                                                                                  var touch = e.originalEvent.touches;
                                                                                                                      
                                                                                                                                  // ensure swiping with one touch and not pinching
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 6661..6692

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

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

                                                                                                                          _getWH : function() {
                                                                                                                      
                                                                                                                              var $container = this.$( 'container' ),
                                                                                                                                  $target = this.$( 'target' ),
                                                                                                                                  self = this,
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 3135..3178

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

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

                                                                                                                              if ( !this._options.swipe ) {
                                                                                                                                  $.each( new Array(2), function( i ) {
                                                                                                                      
                                                                                                                                      // create a new Picture instance
                                                                                                                                      var image = new Galleria.Picture();
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2823..2862

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

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                              if ( options.fullscreenDoubleTap ) {
                                                                                                                      
                                                                                                                                  this.$( 'stage' ).on( 'touchstart', (function() {
                                                                                                                                      var last, cx, cy, lx, ly, now,
                                                                                                                                          getData = function(e) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 3083..3110

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

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

                                                                                                                      $.fn.galleria = function( options ) {
                                                                                                                      
                                                                                                                          var selector = this.selector;
                                                                                                                      
                                                                                                                          // try domReady if element not found
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 6778..6824

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

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

                                                                                                                          var _timer = this._timer = {
                                                                                                                      
                                                                                                                              trunk: {},
                                                                                                                      
                                                                                                                              add: function( id, fn, delay, loop ) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2451..2487

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

                                                                                                                      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

                                                                                                                          var has3d = Galleria.HAS3D = (function() {
                                                                                                                      
                                                                                                                              var el = doc.createElement('p'),
                                                                                                                                  has3d,
                                                                                                                                  t = ['webkit','O','ms','Moz',''],
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 6510..6531

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

                                                                                                                      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

                                                                                                                                  var elems = 'overlay box content shadow title info close prevholder prev nextholder next counter image',
                                                                                                                                      el = {},
                                                                                                                                      op = self._options,
                                                                                                                                      css = '',
                                                                                                                                      abs = 'position:absolute;',
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2151..2179

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

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

                                                                                                                          _playCheck : function() {
                                                                                                                              var self = this,
                                                                                                                                  played = 0,
                                                                                                                                  interval = 20,
                                                                                                                                  now = Utils.timestamp(),
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5357..5391

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

                                                                                                                      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

                                                                                                                              ontouchend: function(e) {
                                                                                                                      
                                                                                                                                  this.touching = false;
                                                                                                                      
                                                                                                                                  // determine if slide attempt triggers next/prev slide
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 6694..6713

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

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

                                                                                                                          lazyLoad: function( index, complete ) {
                                                                                                                      
                                                                                                                              var arr = index.constructor == Array ? index : [ index ],
                                                                                                                                  self = this,
                                                                                                                                  loaded = 0;
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 3471..3502

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

                                                                                                                      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

                                                                                                                          lazyLoadChunks: function( size, delay ) {
                                                                                                                      
                                                                                                                              var len = this.getDataLength(),
                                                                                                                                  i = 0,
                                                                                                                                  n = 0,
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 3514..3549

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

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

                                                                                                                                  if ( IFRAME ) {
                                                                                                                      
                                                                                                                                      fullscreen.iframe = (function() {
                                                                                                                      
                                                                                                                                          var elem,
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 1692..1723

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

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

                                                                                                                      Galleria.loadTheme = function( src, options ) {
                                                                                                                      
                                                                                                                          // Don't load if theme is already loaded
                                                                                                                          if( $('script').filter(function() { return $(this).attr('src') == src; }).length ) {
                                                                                                                              return;
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5680..5712

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

                                                                                                                      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

                                                                                                                      $.extend( Galleria, {
                                                                                                                      
                                                                                                                          // Browser helpers
                                                                                                                          IE9:     IE === 9,
                                                                                                                          IE8:     IE === 8,
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5549..5568

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

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

                                                                                                                                  if (inBrowser) {
                                                                                                                      
                                                                                                                                      self.$('container').addClass('fullscreen');
                                                                                                                                      fullscreen.prev = self.$('container').prev();
                                                                                                                      
                                                                                                                      
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 1743..1767

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

                                                                                                                      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

                                                                                                                              show: function(elem) {
                                                                                                                      
                                                                                                                                  var data = elem.data('idle');
                                                                                                                      
                                                                                                                                  if ( !idle.active || ( !data.busy && !data.complete ) ) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2099..2122

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

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

                                                                                                                              hide : function() {
                                                                                                                      
                                                                                                                                  if ( !self._options.idleMode || self.getIndex() === false ) {
                                                                                                                                      return;
                                                                                                                                  }
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2059..2088

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

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

                                                                                                                              hide: function() {
                                                                                                                      
                                                                                                                                  // remove the image
                                                                                                                                  lightbox.image.image = null;
                                                                                                                      
                                                                                                                      
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2303..2323

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

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

                                                                                                                                  $.each( ['Prev','Next'], function(i, dir) {
                                                                                                                      
                                                                                                                                      var $d = $( el[ dir.toLowerCase() ] ).html( /v/.test( dir ) ? '&#8249;&#160;' : '&#160;&#8250;' ),
                                                                                                                                          $e = $( el[ dir.toLowerCase()+'holder'] );
                                                                                                                      
                                                                                                                      
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2232..2253

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

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

                                                                                                                                      big.load( data.big, function( big ) {
                                                                                                                                          self._scaleImage( big, {
                                                                                                                                              complete: function( big ) {
                                                                                                                                                  self.trigger({
                                                                                                                                                      type: Galleria.LOADFINISH,
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 1818..1837

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

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

                                                                                                                          var controls = this._controls = {
                                                                                                                      
                                                                                                                              0: undef,
                                                                                                                      
                                                                                                                              1: undef,
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 7 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 1236..1261

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

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

                                                                                                                          resize : function( measures, complete ) {
                                                                                                                      
                                                                                                                              if ( typeof measures == 'function' ) {
                                                                                                                                  complete = measures;
                                                                                                                                  measures = undef;
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 7 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4629..4654

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

                                                                                                                      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

                                                                                                                      $.extend( $.easing, {
                                                                                                                      
                                                                                                                          galleria: function (_, t, b, c, d) {
                                                                                                                              if ((t/=d/2) < 1) {
                                                                                                                                  return c/2*t*t*t + b;
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 7 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 6484..6501

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

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

                                                                                                                      Galleria.on = function( type, callback ) {
                                                                                                                          if ( !type ) {
                                                                                                                              return;
                                                                                                                          }
                                                                                                                      
                                                                                                                      
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 7 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5803..5827

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

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

                                                                                                                          setCounter: function( index ) {
                                                                                                                      
                                                                                                                              if ( typeof index === 'number' ) {
                                                                                                                                  index++;
                                                                                                                              } else if ( typeof index === 'undefined' ) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 7 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5420..5444

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

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

                                                                                                                          destroy : function() {
                                                                                                                              this.$( 'target' ).data( 'galleria', null );
                                                                                                                              this.$( 'container' ).off( 'galleria' );
                                                                                                                              this.get( 'target' ).innerHTML = this._original.html;
                                                                                                                              this.clearTimer();
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 6 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 3941..3954

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

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

                                                                                                                              setup: function() {
                                                                                                                                  this.width = $( this.elem ).width();
                                                                                                                                  this.length = M.ceil( $(this.child).width() / this.width );
                                                                                                                                  if ( this.index !== 0 ) {
                                                                                                                                      this.index = M.max(0, M.min( this.index, this.length-1 ) );
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 6 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 6629..6636

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

                                                                                                                      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.Picture = function( id ) {
                                                                                                                      
                                                                                                                          // save the id
                                                                                                                          this.id = id || null;
                                                                                                                      
                                                                                                                      
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 2 other locations - About 6 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.1.js on lines 3408..3437
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 6017..6046

                                                                                                                      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.3.5.js and 2 other locations - About 6 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.1.js on lines 3111..3132
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5497..5518

                                                                                                                      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

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

                                                                                                                              parseCallback: function( callback, enter ) {
                                                                                                                      
                                                                                                                                  return _transitions.active ? function() {
                                                                                                                                      if ( typeof callback == 'function' ) {
                                                                                                                                          callback.call(self);
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 6 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 1613..1632

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

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

                                                                                                                              remove: function(elem) {
                                                                                                                      
                                                                                                                                  elem = $(elem);
                                                                                                                      
                                                                                                                                  $.each(idle.trunk, function(i, el) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 6 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2017..2032

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

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

                                                                                                                      Galleria.log = function() {
                                                                                                                          var args = Utils.array( arguments );
                                                                                                                          if( 'console' in window && 'log' in window.console ) {
                                                                                                                              try {
                                                                                                                                  return window.console.log.apply( window.console, args );
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 5 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5883..5896

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

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

                                                                                                                              this.$( 'image-nav-right, image-nav-left' ).on( 'click:fast', function(e) {
                                                                                                                      
                                                                                                                                  // pause if options is set
                                                                                                                                  if ( options.pauseOnInteraction ) {
                                                                                                                                      self.pause();
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 5 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 3015..3034

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

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

                                                                                                                          setInfo : function( index ) {
                                                                                                                      
                                                                                                                              var self = this,
                                                                                                                                  data = this.getData( index );
                                                                                                                      
                                                                                                                      
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 5 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5455..5472

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

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

                                                                                                                          push : function() {
                                                                                                                              var self = this,
                                                                                                                                  args = Utils.array( arguments );
                                                                                                                      
                                                                                                                              if ( args.length == 1 && args[0].constructor == Array ) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 5 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 3988..4003

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

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

                                                                                                                              ontouchstart: function(e) {
                                                                                                                      
                                                                                                                                  var touch = e.originalEvent.touches;
                                                                                                                      
                                                                                                                                  this.start = {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 5 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 6643..6659

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

                                                                                                                      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

                                                                                                                              var src = this.isFullscreen() && data.big ? data.big : ( data.image || data.iframe ),
                                                                                                                                  active = this._controls.getActive(),
                                                                                                                                  next = this._controls.getNext(),
                                                                                                                                  cached = next.isCached( src ),
                                                                                                                                  thumb = this._thumbnails[ queue.index ],
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 5 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4857..4864

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

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

                                                                                                                      Galleria.configure = function( key, value ) {
                                                                                                                      
                                                                                                                          var opts = {};
                                                                                                                      
                                                                                                                          if( typeof key == 'string' && value ) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 4 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5769..5787

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

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

                                                                                                                          append : function( data ) {
                                                                                                                              var i, j;
                                                                                                                              for( i in data ) {
                                                                                                                                  if ( data.hasOwnProperty( i ) ) {
                                                                                                                                      if ( data[i].constructor === Array ) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 4 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4538..4552

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

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

                                                                                                                                  if ( self._options.swipe ) {
                                                                                                                                      $.each( self._controls.slides, function(i, img) {
                                                                                                                                          self._scaleImage( img );
                                                                                                                                          $( img.container ).css('left', self._stageWidth * i);
                                                                                                                                      });
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 4 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4682..4691

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

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

                                                                                                                      Galleria.unloadTheme = function() {
                                                                                                                      
                                                                                                                          if ( typeof Galleria.theme == 'object' ) {
                                                                                                                      
                                                                                                                              $('script').each(function( i, script ) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 4 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5720..5735

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

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

                                                                                                                                  if ( IFRAME && fullscreen.iframe ) {
                                                                                                                                      Utils.forceStyles( fullscreen.pd.documentElement, htmlbody );
                                                                                                                                      Utils.forceStyles( fullscreen.pd.body, htmlbody );
                                                                                                                                      Utils.forceStyles( fullscreen.iframe, $.extend( htmlbody, {
                                                                                                                                          width: '100%',
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 4 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 1769..1781

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

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

                                                                                                                              if ( options.carousel ) {
                                                                                                                                  var count = 0,
                                                                                                                                      show = options.show;
                                                                                                                                  this.bind( Galleria.THUMBNAIL, function() {
                                                                                                                                      this.updateCarousel();
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 4 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 3061..3070

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

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

                                                                                                                                  self.rescale(function() {
                                                                                                                      
                                                                                                                                      self.addTimer(false, function() {
                                                                                                                                          // show the image after 50 ms
                                                                                                                                          if ( inBrowser ) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 3 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 1842..1858

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

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

                                                                                                                                  $.each({
                                                                                                                                          box: 'shadow content close prevholder nextholder',
                                                                                                                                          info: 'title counter',
                                                                                                                                          content: 'info image',
                                                                                                                                          prevholder: 'prev',
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 3 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2208..2220

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

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

                                                                                                                              $.each( ['info','counter','image-nav'], function( i, el ) {
                                                                                                                                  if ( options[ 'show' + el.substr(0,1).toUpperCase() + el.substr(1).replace(/-/,'') ] === false ) {
                                                                                                                                      Utils.moveOut( self.get( el.toLowerCase() ) );
                                                                                                                                  }
                                                                                                                              });
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 3 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 3037..3041

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

                                                                                                                      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

                                                                                                                          var requestFrame = (function(){
                                                                                                                              var r = 'RequestAnimationFrame';
                                                                                                                              return window.requestAnimationFrame ||
                                                                                                                                     window['webkit'+r] ||
                                                                                                                                     window['moz'+r] ||
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 3 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 6534..6544

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 105.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                      if ( typeof module === "object" && module && typeof module.exports === "object" ) {
                                                                                                                          module.exports = Galleria;
                                                                                                                      } else {
                                                                                                                          window.Galleria = Galleria;
                                                                                                                          if ( typeof define === "function" && define.amd ) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 3 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 6827..6834

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

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

                                                                                                                                      if ( !image.ready || $(image.image).attr('src') != src ) {
                                                                                                                                          if ( data.iframe && !data.image ) {
                                                                                                                                              image.isIframe = true;
                                                                                                                                          }
                                                                                                                                          image.load(src, function(image) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 3 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4814..4829

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 99.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                          splice : function() {
                                                                                                                              var self = this,
                                                                                                                                  args = Utils.array( arguments );
                                                                                                                              window.setTimeout(function() {
                                                                                                                                  protoArray.splice.apply( self._data, args );
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 3 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 3966..3976

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

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

                                                                                                                                  if ( this.touching || M.abs(distance) <= 1 ) {
                                                                                                                                      this.pos = this.to;
                                                                                                                                      distance = 0;
                                                                                                                                      if ( this.anim && !this.touching ) {
                                                                                                                                          this.config.oncomplete( this.index );
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 3 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 6740..6768

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

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

                                                                                                                      Galleria.ready = function( fn ) {
                                                                                                                          if ( typeof fn != 'function' ) {
                                                                                                                              return Galleria;
                                                                                                                          }
                                                                                                                          $.each( _galleries, function( i, gallery ) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 2 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5907..5916

                                                                                                                      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

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

                                                                                                                              exit: function( callback ) {
                                                                                                                      
                                                                                                                                  fullscreen.beforeExit(function() {
                                                                                                                      
                                                                                                                                      callback = fullscreen.parseCallback( callback );
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 2 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 1872..1884

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

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

                                                                                                                              removeEvent : function() {
                                                                                                                                  idle.bound = false;
                                                                                                                                  self.$('container').on( 'mousemove click', idle.showAll );
                                                                                                                                  if ( self._options.idleMode == 'hover' ) {
                                                                                                                                      self.$('container').off( 'mouseleave', idle.hide );
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 3 other locations - About 2 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2034..2040
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2042..2048
                                                                                                                      assets/js/galleria/galleria-1.3.5.js on lines 2039..2045

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

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

                                                                                                                              addEvent : function() {
                                                                                                                                  idle.bound = true;
                                                                                                                                  self.$('container').on( 'mousemove click', idle.showAll );
                                                                                                                                  if ( self._options.idleMode == 'hover' ) {
                                                                                                                                      self.$('container').on( 'mouseleave', idle.hide );
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 3 other locations - About 2 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2034..2040
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2042..2048
                                                                                                                      assets/js/galleria/galleria-1.3.5.js on lines 2047..2053

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

                                                                                                                      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

                                                                                                                                  var src = this.isFullscreen() && data.big ? data.big : ( data.image || data.iframe ),
                                                                                                                                      image = this._controls.slides[index],
                                                                                                                                      cached = image.isCached( src ),
                                                                                                                                      thumb = this._thumbnails[ index ];
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 2 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4776..4779

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

                                                                                                                      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

                                                                                                                              (function( can ) {
                                                                                                                                  if ( !( 'getContext' in can ) ) {
                                                                                                                                      can = null;
                                                                                                                                      return;
                                                                                                                                  }
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 2 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2699..2713

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

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

                                                                                                                                  var complete = function() {
                                                                                                                      
                                                                                                                                      self._layers[index].innerHTML = self.getData().layer || '';
                                                                                                                      
                                                                                                                                      self.trigger($.extend(evObj, {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 2 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4801..4809

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 86.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                          hasInfo : function( index ) {
                                                                                                                      
                                                                                                                              var check = 'title description'.split(' '),
                                                                                                                                  i;
                                                                                                                      
                                                                                                                      
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 2 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5483..5495

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

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

                                                                                                                          trigger : function( type ) {
                                                                                                                      
                                                                                                                              type = typeof type === 'object' ?
                                                                                                                                  $.extend( type, { scope: this } ) :
                                                                                                                                  { type: _patchEvent( type ), scope: this };
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 2 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4058..4067

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

                                                                                                                      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 ( !!_instances[ index ] ) {
                                                                                                                              return _instances[ index ];
                                                                                                                          } else if ( typeof index !== 'number' ) {
                                                                                                                              return _instances;
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 2 other locations - About 2 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.1.js on lines 3336..3344
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5746..5754

                                                                                                                      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

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

                                                                                                                              $.each( Galleria.on.binds, function(i, bind) {
                                                                                                                                  // check if already bound
                                                                                                                                  if ( $.inArray( bind.hash, self._binds ) == -1 ) {
                                                                                                                                      self.bind( bind.type, bind.callback );
                                                                                                                                  }
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 2 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 3113..3118

                                                                                                                      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

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

                                                                                                                      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.3.5.js and 2 other locations - About 2 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.1.js on lines 1183..1186
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2199..2202

                                                                                                                      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.3.5.js and 2 other locations - About 2 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.1.js on lines 2392..2401
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4439..4448

                                                                                                                      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

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

                                                                                                                      $.each( _events, function( i, ev ) {
                                                                                                                      
                                                                                                                          // legacy events
                                                                                                                          var type = /_/.test( ev ) ? ev.replace( /_/g, '' ) : ev;
                                                                                                                      
                                                                                                                      
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 2 hrs to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5540..5547

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

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

                                                                                                                                  var data = self.getData(),
                                                                                                                                      options = self._options,
                                                                                                                                      inBrowser = !self._options.trueFullscreen || !_nativeFullscreen.support,
                                                                                                                                      htmlbody = {
                                                                                                                                          height: '100%',
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 1733..1741

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

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

                                                                                                                              this.append({
                                                                                                                                  'info-text' :
                                                                                                                                      ['info-title', 'info-description'],
                                                                                                                                  'info' :
                                                                                                                                      ['info-text'],
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2792..2807

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

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

                                                                                                                      Galleria.run = function( selector, options ) {
                                                                                                                          if ( $.isFunction( options ) ) {
                                                                                                                              options = { extend: options };
                                                                                                                          }
                                                                                                                          $( selector || '#galleria' ).galleria( options );
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5844..5850

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

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

                                                                                                                          play : function( delay ) {
                                                                                                                      
                                                                                                                              this._playing = true;
                                                                                                                      
                                                                                                                              this._playtime = delay || this._playtime;
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5297..5308

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

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

                                                                                                                              self.trigger( {
                                                                                                                                  type: Galleria.LOADSTART,
                                                                                                                                  cached: cached,
                                                                                                                                  index: queue.index,
                                                                                                                                  rewind: queue.rewind,
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5039..5047

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

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

                                                                                                                      Galleria.requires = function( version, msg ) {
                                                                                                                          msg = msg || 'You need to upgrade Galleria to version ' + version + ' to use one or more components.';
                                                                                                                          if ( Galleria.version < version ) {
                                                                                                                              Galleria.raise(msg, true);
                                                                                                                          }
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5999..6005

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

                                                                                                                      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

                                                                                                                              show: function( index ) {
                                                                                                                                  if ( index != this.index ) {
                                                                                                                                      this.config.onchange.call(this, index);
                                                                                                                                  } else {
                                                                                                                                      this.to = -( index*this.width );
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 6715..6721

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

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

                                                                                                                          proxy : function( fn, scope ) {
                                                                                                                              if ( typeof fn !== 'function' ) {
                                                                                                                                  return F;
                                                                                                                              }
                                                                                                                              scope = scope || this;
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4400..4408

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

                                                                                                                      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.3.5.js and 2 other locations - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.1.js on lines 2830..2833
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5158..5161

                                                                                                                      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.3.5.js and 2 other locations - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.1.js on lines 2817..2820
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5145..5148

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

                                                                                                                                      if ( !this.anim ) {
                                                                                                                                          // save animation parameters
                                                                                                                                          this.anim = { start: this.pos, time: +new Date(), distance: distance, factor: factor, destination: this.to };
                                                                                                                                      }
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 6749..6752

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

                                                                                                                              if ( this.finger && index !== this._active ) {
                                                                                                                                  this.finger.to = -( index*this.finger.width );
                                                                                                                                  this.finger.index = index;
                                                                                                                              }
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4761..4764

                                                                                                                      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

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

                                                                                                                              addTimer : function() {
                                                                                                                                  if( self._options.idleMode == 'hover' ) {
                                                                                                                                      return;
                                                                                                                                  }
                                                                                                                                  self.addTimer( 'idle', function() {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2050..2057

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

                                                                                                                      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

                                                                                                                              moveTo: function( index ) {
                                                                                                                                  if ( index != this.index ) {
                                                                                                                                      this.pos = this.to = -( index*this.width );
                                                                                                                                      this.index = index;
                                                                                                                                  }
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 6723..6728

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

                                                                                                                      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.3.5.js and 2 other locations - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.1.js on lines 2951..2958
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5279..5286

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

                                                                                                                                      self._controls.frames[ self._controls.active ].scale({
                                                                                                                                          width: self._stageWidth,
                                                                                                                                          height: self._stageHeight,
                                                                                                                                          iframelimit: self._options.maxVideoSize
                                                                                                                                      });
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4697..4701

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

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

                                                                                                                              if ( swipe ) {
                                                                                                                      
                                                                                                                                  var data = this.getData(index),
                                                                                                                                      self = this;
                                                                                                                                  if ( !data ) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4768..4840

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

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                              if ( !swipe &&
                                                                                                                                  ( this._queue.length > 3 || index === false || ( !this._options.queue && this._queue.stalled ) ) ) {
                                                                                                                                  return;
                                                                                                                              }
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4744..4747

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

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

                                                                                                                                  if ( IFRAME && fullscreen.iframe ) {
                                                                                                                                      fullscreen.iframe.scrolled = $( window.parent ).scrollTop();
                                                                                                                                      window.parent.scrollTo(0, 0);
                                                                                                                                  }
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 1728..1731

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

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

                                                                                                                              if ( options.responsive ) {
                                                                                                                                  $win.on( 'resize', function() {
                                                                                                                                      if ( !self.isFullscreen() ) {
                                                                                                                                          self.resize();
                                                                                                                                      }
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 3073..3079

                                                                                                                      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

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

                                                                                                                                  if ( this.width && distance ) {
                                                                                                                                      factor = M.max(0.5, M.min(1.5, M.abs(distance / this.width) ) );
                                                                                                                                  }
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 6735..6737

                                                                                                                      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

                                                                                                                      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.3.5.js and 2 other locations - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.1.js on lines 537..539
                                                                                                                      assets/js/galleria/galleria-1.3.3.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

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

                                                                                                                                      self.trigger( {
                                                                                                                                          type: Galleria.LOADSTART,
                                                                                                                                          cached: cached,
                                                                                                                                          rewind: false,
                                                                                                                                          index: index,
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 1808..1816

                                                                                                                      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

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

                                                                                                                          bind : function(type, fn) {
                                                                                                                      
                                                                                                                              // allow 'image' instead of Galleria.IMAGE
                                                                                                                              type = _patchEvent( type );
                                                                                                                      
                                                                                                                      
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4025..4032

                                                                                                                      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

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

                                                                                                                          toggleFullscreen: function( callback ) {
                                                                                                                              this._fullscreen[ this.isFullscreen() ? 'exit' : 'enter'].apply( this, Utils.array( arguments ) );
                                                                                                                              return this;
                                                                                                                          },
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4159..4162

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

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

                                                                                                                                      var big    = new Galleria.Picture(),
                                                                                                                                          cached = big.isCached( data.big ),
                                                                                                                                          index  = self.getIndex(),
                                                                                                                                          thumb  = self._thumbnails[ index ];
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 1803..1806

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

                                                                                                                              showAll : function() {
                                                                                                                      
                                                                                                                                  self.clearTimer( 'idle' );
                                                                                                                      
                                                                                                                                  $.each( idle.trunk, function( i, elem ) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2090..2097

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

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

                                                                                                                          removePan: function() {
                                                                                                                      
                                                                                                                              // todo: doublecheck IE8
                                                                                                                      
                                                                                                                              this.$( 'stage' ).off( 'mousemove' );
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4416..4425

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

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

                                                                                                                                          var index = M.max( 0, M.min( parseInt( page, 10 ), self.getDataLength() - 1 ) ),
                                                                                                                                              data = self.getData(index);
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 55 mins to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2888..2889

                                                                                                                      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

                                                                                                                      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.3.5.js and 2 other locations - About 55 mins to fix
                                                                                                                      assets/js/galleria/galleria-1.1.js on lines 533..535
                                                                                                                      assets/js/galleria/galleria-1.3.3.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

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

                                                                                                                              Utils.hide( this.$( 'counter' ).append(
                                                                                                                                  this.get( 'current' ),
                                                                                                                                  doc.createTextNode(' / '),
                                                                                                                                  this.get( 'total' )
                                                                                                                              ) );
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 55 mins to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2809..2813

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

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

                                                                                                                          prev : function() {
                                                                                                                              if ( this.getDataLength() > 1 ) {
                                                                                                                                  this.show( this.getPrev(), true );
                                                                                                                              }
                                                                                                                              return this;
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.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.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

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

                                                                                                                          addIdleState: function( elem, styles, from, hide ) {
                                                                                                                              this._idle.add.apply( this._idle, Utils.array( arguments ) );
                                                                                                                              return this;
                                                                                                                          },
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 50 mins to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4085..4088

                                                                                                                      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

                                                                                                                      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.3.5.js and 2 other locations - About 50 mins to fix
                                                                                                                      assets/js/galleria/galleria-1.1.js on lines 2737..2740
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5033..5036

                                                                                                                      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

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

                                                                                                                      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.3.5.js and 2 other locations - About 45 mins to fix
                                                                                                                      assets/js/galleria/galleria-1.1.js on lines 2882..2885
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 5210..5213

                                                                                                                      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

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

                                                                                                                      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.3.5.js and 2 other locations - About 45 mins to fix
                                                                                                                      assets/js/galleria/galleria-1.1.js on lines 2483..2486
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4530..4533

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

                                                                                                                      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.3.5.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.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 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.3.5.js and 2 other locations - About 40 mins to fix
                                                                                                                      assets/js/galleria/galleria-1.1.js on lines 1361..1361
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2522..2522

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

                                                                                                                              this.$( 'container' ).addClass( ( Galleria.TOUCH ? 'touch' : 'notouch' ) + ' ' + this._options.variation );
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 40 mins to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2820..2820

                                                                                                                      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

                                                                                                                          refreshTooltip: function( elem ) {
                                                                                                                              this._tooltip.show.apply( this._tooltip, Utils.array(arguments) );
                                                                                                                              return this;
                                                                                                                          },
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.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.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 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.3.5.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.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

                                                                                                                      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

                                                                                                                          removeIdleState: function( elem ) {
                                                                                                                              this._idle.remove.apply( this._idle, Utils.array( arguments ) );
                                                                                                                              return this;
                                                                                                                          },
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.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.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 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

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

                                                                                                                                  $.each(cssMap, function( key, value ) {
                                                                                                                                      css += '.galleria-'+prefix+key+'{'+value+'}';
                                                                                                                                  });
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 40 mins to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2188..2190

                                                                                                                      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.3.5.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.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 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( parentID, childID ) {
                                                                                                                              this.$( parentID ).prepend( this.get( childID ) || childID );
                                                                                                                              return this;
                                                                                                                          },
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.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.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

                                                                                                                      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

                                                                                                                      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.3.5.js and 2 other locations - About 35 mins to fix
                                                                                                                      assets/js/galleria/galleria-1.1.js on lines 1670..1676
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2865..2871

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

                                                                                                                          detachKeyboard : function() {
                                                                                                                              this._keyboard.detach.apply( this._keyboard, Utils.array( arguments ) );
                                                                                                                              return this;
                                                                                                                          },
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.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.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

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

                                                                                                                                  css += '.galleria-'+prefix+'box.iframe .galleria-'+prefix+'prevholder,'+
                                                                                                                                         '.galleria-'+prefix+'box.iframe .galleria-'+prefix+'nextholder{'+
                                                                                                                                         'width:100px;height:100px;top:50%;margin-top:-70px}';
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 35 mins to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2192..2194

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

                                                                                                                          hasVariation: function( variation ) {
                                                                                                                              return $.inArray( variation, this._options.variation.split(/\s+/) ) > -1;
                                                                                                                          },
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 35 mins to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4243..4245

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

                                                                                                                                  if ( !inBrowser ) {
                                                                                                                                      Utils.show( self.getActiveImage() );
                                                                                                                                  } else {
                                                                                                                                      $win.resize( fullscreen.scale );
                                                                                                                                  }
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 35 mins to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 1860..1864

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

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

                                                                                                                          unbind : function(type) {
                                                                                                                      
                                                                                                                              type = _patchEvent( type );
                                                                                                                      
                                                                                                                              this.$( 'container' ).off( type );
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 35 mins to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4042..4048

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

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

                                                                                                                              if ( typeof Galleria.theme === 'object' ) {
                                                                                                                                  this._init();
                                                                                                                              } else {
                                                                                                                                  // push the instance into the pool and run it when the theme is ready
                                                                                                                                  _pool.push( this );
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 35 mins to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2659..2664

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

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

                                                                                                                                  var evObj = {
                                                                                                                                      cached: cached,
                                                                                                                                      index: index,
                                                                                                                                      rewind: rewind,
                                                                                                                                      imageTarget: image.image,
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 35 mins to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 4781..4788

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

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

                                                                                                                          addTimer : function() {
                                                                                                                              this._timer.add.apply( this._timer, Utils.array( arguments ) );
                                                                                                                              return this;
                                                                                                                          },
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 3 other locations - About 30 mins to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 3123..3126
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 3128..3131
                                                                                                                      assets/js/galleria/galleria-1.3.5.js on lines 3146..3149

                                                                                                                      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

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

                                                                                                                                  this.$( 'images' ).css({
                                                                                                                                      position: 'absolute',
                                                                                                                                      top: 0,
                                                                                                                                      left: 0,
                                                                                                                                      width: 0,
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 1 other location - About 30 mins to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 2874..2880

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

                                                                                                                          clearTimer : function() {
                                                                                                                              this._timer.clear.apply( this._timer, Utils.array( arguments ) );
                                                                                                                              return this;
                                                                                                                          },
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/galleria/galleria-1.3.5.js and 3 other locations - About 30 mins to fix
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 3123..3126
                                                                                                                      assets/js/galleria/galleria-1.3.3.js on lines 3128..3131
                                                                                                                      assets/js/galleria/galleria-1.3.5.js on lines 3141..3144

                                                                                                                      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