jamesrwhite/minicron

View on GitHub
server/lib/minicron/hub/assets/js/perfect-scrollbar.js

Summary

Maintainability
F
1 mo
Test Coverage

File perfect-scrollbar.js has 1302 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* perfect-scrollbar v0.6.16 */
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
'use strict';

var ps = require('../main');
Severity: Major
Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 3 days to fix

    Function 13 has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring.
    Open

    },{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],13:[function(require,module,exports){
    'use strict';
    
    var instances = require('../instances');
    var updateGeometry = require('../update-geometry');
    Severity: Minor
    Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function 16 has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
    Open

    },{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],16:[function(require,module,exports){
    'use strict';
    
    var _ = require('../../lib/helper');
    var instances = require('../instances');
    Severity: Minor
    Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function 19 has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
    Open

    },{"../lib/class":2,"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(require,module,exports){
    'use strict';
    
    var _ = require('../lib/helper');
    var cls = require('../lib/class');
    Severity: Minor
    Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 7 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function 16 has 145 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],16:[function(require,module,exports){
    'use strict';
    
    var _ = require('../../lib/helper');
    var instances = require('../instances');
    Severity: Major
    Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 5 hrs to fix

      Function 20 has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
      Open

      },{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-scroll":20}],20:[function(require,module,exports){
      'use strict';
      
      var instances = require('./instances');
      
      
      Severity: Minor
      Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 5 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function 12 has 139 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      },{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],12:[function(require,module,exports){
      'use strict';
      
      var _ = require('../../lib/helper');
      var dom = require('../../lib/dom');
      Severity: Major
      Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 5 hrs to fix

        Function bindTouchHandler has 132 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function bindTouchHandler(element, i, supportsTouch, supportsIePointer) {
          function shouldPreventDefault(deltaX, deltaY) {
            var scrollTop = element.scrollTop;
            var scrollLeft = element.scrollLeft;
            var magnitudeX = Math.abs(deltaX);
        Severity: Major
        Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 5 hrs to fix

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

          function bindKeyboardHandler(element, i) {
            var hovered = false;
            i.event.bind(element, 'mouseenter', function () {
              hovered = true;
            });
          Severity: Major
          Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 5 hrs to fix

            Function 19 has 112 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            },{"../lib/class":2,"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(require,module,exports){
            'use strict';
            
            var _ = require('../lib/helper');
            var cls = require('../lib/class');
            Severity: Major
            Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 4 hrs to fix

              Function 13 has 109 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              },{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],13:[function(require,module,exports){
              'use strict';
              
              var instances = require('../instances');
              var updateGeometry = require('../update-geometry');
              Severity: Major
              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 4 hrs to fix

                Function 3 has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                Open

                },{}],3:[function(require,module,exports){
                'use strict';
                
                var DOM = {};
                
                
                Severity: Minor
                Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 4 hrs to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Function 15 has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                },{"../instances":18,"../update-geometry":19}],15:[function(require,module,exports){
                'use strict';
                
                var _ = require('../../lib/helper');
                var instances = require('../instances');
                Severity: Major
                Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 4 hrs to fix

                  Function bindMouseWheelHandler has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function bindMouseWheelHandler(element, i) {
                    var shouldPrevent = false;
                  
                    function shouldPreventDefault(deltaX, deltaY) {
                      var scrollTop = element.scrollTop;
                  Severity: Major
                  Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 4 hrs to fix

                    Function bindSelectionHandler has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function bindSelectionHandler(element, i) {
                      function getRangeNode() {
                        var selection = window.getSelection ? window.getSelection() :
                                        document.getSelection ? document.getSelection() : '';
                        if (selection.toString().length === 0) {
                    Severity: Major
                    Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 3 hrs to fix

                      Function 12 has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
                      Open

                      },{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],12:[function(require,module,exports){
                      'use strict';
                      
                      var _ = require('../../lib/helper');
                      var dom = require('../../lib/dom');
                      Severity: Minor
                      Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 3 hrs to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

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

                      },{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(require,module,exports){
                      'use strict';
                      
                      var _ = require('../lib/helper');
                      var cls = require('../lib/class');
                      Severity: Major
                      Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 3 hrs to fix

                        Function 1 has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                        Open

                        (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
                        'use strict';
                        
                        var ps = require('../main');
                        var psInstances = require('../plugin/instances');
                        Severity: Minor
                        Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 3 hrs to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function 11 has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        },{"../instances":18,"../update-geometry":19,"../update-scroll":20}],11:[function(require,module,exports){
                        'use strict';
                        
                        var _ = require('../../lib/helper');
                        var dom = require('../../lib/dom');
                        Severity: Major
                        Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 3 hrs to fix

                          Function 6 has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                          Open

                          },{}],6:[function(require,module,exports){
                          'use strict';
                          
                          var cls = require('./class');
                          var dom = require('./dom');
                          Severity: Minor
                          Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 3 hrs to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function 20 has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          },{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-scroll":20}],20:[function(require,module,exports){
                          'use strict';
                          
                          var instances = require('./instances');
                          
                          
                          Severity: Major
                          Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 2 hrs to fix

                            Function 6 has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            },{}],6:[function(require,module,exports){
                            'use strict';
                            
                            var cls = require('./class');
                            var dom = require('./dom');
                            Severity: Major
                            Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 2 hrs to fix

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

                              },{}],3:[function(require,module,exports){
                              'use strict';
                              
                              var DOM = {};
                              
                              
                              Severity: Major
                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 2 hrs to fix

                                Function exports has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                module.exports = function (element) {
                                  var i = instances.get(element);
                                
                                  i.containerWidth = element.clientWidth;
                                  i.containerHeight = element.clientHeight;
                                Severity: Major
                                Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 2 hrs to fix

                                  Function exports has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  module.exports = function (element, axis, value) {
                                    if (typeof element === 'undefined') {
                                      throw 'You must provide an element to the update-scroll function';
                                    }
                                  
                                  
                                  Severity: Major
                                  Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 2 hrs to fix

                                    Function Instance has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function Instance(element) {
                                      var i = this;
                                    
                                      i.settings = _.clone(defaultSettings);
                                      i.containerWidth = null;
                                    Severity: Major
                                    Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 2 hrs to fix

                                      Function 4 has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      },{}],4:[function(require,module,exports){
                                      'use strict';
                                      
                                      var EventElement = function (element) {
                                        this.element = element;
                                      Severity: Major
                                      Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 2 hrs to fix

                                        Function 15 has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                        },{"../instances":18,"../update-geometry":19}],15:[function(require,module,exports){
                                        'use strict';
                                        
                                        var _ = require('../../lib/helper');
                                        var instances = require('../instances');
                                        Severity: Minor
                                        Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 2 hrs to fix

                                        Cognitive Complexity

                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                        A method's cognitive complexity is based on a few simple rules:

                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                        • Code is considered more complex for each "break in the linear flow of the code"
                                        • Code is considered more complex when "flow breaking structures are nested"

                                        Further reading

                                        `` has 21 functions (exceeds 20 allowed). Consider refactoring.
                                        Open

                                        (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
                                        'use strict';
                                        
                                        var ps = require('../main');
                                        var psInstances = require('../plugin/instances');
                                        Severity: Minor
                                        Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 2 hrs to fix

                                          Function e has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                          (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
                                          Severity: Minor
                                          Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 2 hrs to fix

                                          Cognitive Complexity

                                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                          A method's cognitive complexity is based on a few simple rules:

                                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                          • Code is considered more complex for each "break in the linear flow of the code"
                                          • Code is considered more complex when "flow breaking structures are nested"

                                          Further reading

                                          Function 2 has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                          },{"../main":7,"../plugin/instances":18}],2:[function(require,module,exports){
                                          'use strict';
                                          
                                          function oldAdd(element, className) {
                                            var classes = element.className.split(' ');
                                          Severity: Minor
                                          Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 1 hr to fix

                                          Cognitive Complexity

                                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                          A method's cognitive complexity is based on a few simple rules:

                                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                          • Code is considered more complex for each "break in the linear flow of the code"
                                          • Code is considered more complex when "flow breaking structures are nested"

                                          Further reading

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

                                          },{"../main":7,"../plugin/instances":18}],2:[function(require,module,exports){
                                          'use strict';
                                          
                                          function oldAdd(element, className) {
                                            var classes = element.className.split(' ');
                                          Severity: Minor
                                          Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 1 hr to fix

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

                                            function bindMouseScrollYHandler(element, i) {
                                              var currentTop = null;
                                              var currentPageY = null;
                                            
                                              function updateScrollTop(deltaY) {
                                            Severity: Minor
                                            Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 1 hr to fix

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

                                              function bindMouseScrollXHandler(element, i) {
                                                var currentLeft = null;
                                                var currentPageX = null;
                                              
                                                function updateScrollLeft(deltaX) {
                                              Severity: Minor
                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 1 hr to fix

                                                Function 4 has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                                Open

                                                },{}],4:[function(require,module,exports){
                                                'use strict';
                                                
                                                var EventElement = function (element) {
                                                  this.element = element;
                                                Severity: Minor
                                                Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 1 hr to fix

                                                Cognitive Complexity

                                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                A method's cognitive complexity is based on a few simple rules:

                                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                • Code is considered more complex for each "break in the linear flow of the code"
                                                • Code is considered more complex when "flow breaking structures are nested"

                                                Further reading

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

                                                (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
                                                'use strict';
                                                
                                                var ps = require('../main');
                                                var psInstances = require('../plugin/instances');
                                                Severity: Minor
                                                Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 1 hr to fix

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

                                                    function mousewheelHandler(e) {
                                                      var delta = getDeltaFromEvent(e);
                                                  
                                                      var deltaX = delta[0];
                                                      var deltaY = delta[1];
                                                  Severity: Minor
                                                  Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 1 hr to fix

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

                                                    },{"../lib/dom":3,"../lib/helper":6,"./instances":18}],10:[function(require,module,exports){
                                                    'use strict';
                                                    
                                                    var instances = require('../instances');
                                                    var updateGeometry = require('../update-geometry');
                                                    Severity: Minor
                                                    Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 1 hr to fix

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

                                                      function updateCss(element, i) {
                                                        var xRailOffset = {width: i.railXWidth};
                                                        if (i.isRtl) {
                                                          xRailOffset.left = i.negativeScrollAdjustment + element.scrollLeft + i.containerWidth - i.contentWidth;
                                                        } else {
                                                      Severity: Minor
                                                      Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 1 hr to fix

                                                        Function 11 has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                                        Open

                                                        },{"../instances":18,"../update-geometry":19,"../update-scroll":20}],11:[function(require,module,exports){
                                                        'use strict';
                                                        
                                                        var _ = require('../../lib/helper');
                                                        var dom = require('../../lib/dom');
                                                        Severity: Minor
                                                        Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 1 hr to fix

                                                        Cognitive Complexity

                                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                        A method's cognitive complexity is based on a few simple rules:

                                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                        • Code is considered more complex for each "break in the linear flow of the code"
                                                        • Code is considered more complex when "flow breaking structures are nested"

                                                        Further reading

                                                        Function 18 has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                        Open

                                                        },{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(require,module,exports){
                                                        'use strict';
                                                        
                                                        var _ = require('../lib/helper');
                                                        var cls = require('../lib/class');
                                                        Severity: Minor
                                                        Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 55 mins to fix

                                                        Cognitive Complexity

                                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                        A method's cognitive complexity is based on a few simple rules:

                                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                        • Code is considered more complex for each "break in the linear flow of the code"
                                                        • Code is considered more complex when "flow breaking structures are nested"

                                                        Further reading

                                                        Avoid too many return statements within this function.
                                                        Open

                                                            return true;
                                                        Severity: Major
                                                        Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 30 mins to fix

                                                          Avoid too many return statements within this function.
                                                          Open

                                                              return true;
                                                          Severity: Major
                                                          Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 30 mins to fix

                                                            Avoid too many return statements within this function.
                                                            Open

                                                                  return element.msMatchesSelector(query);
                                                            Severity: Major
                                                            Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js - About 30 mins to fix

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

                                                                function shouldPreventDefault(deltaX, deltaY) {
                                                                  var scrollTop = element.scrollTop;
                                                                  if (deltaX === 0) {
                                                                    if (!i.scrollbarYActive) {
                                                                      return false;
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 1 day to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 715..736

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

                                                              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 shouldPreventDefault(deltaX, deltaY) {
                                                                  var scrollTop = element.scrollTop;
                                                                  if (deltaX === 0) {
                                                                    if (!i.scrollbarYActive) {
                                                                      return false;
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 1 day to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 568..589

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

                                                              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

                                                                i.event.bind(i.scrollbarX, 'mousedown', function (e) {
                                                                  currentPageX = e.pageX;
                                                                  currentLeft = _.toInt(dom.css(i.scrollbarX, 'left')) * i.railXRatio;
                                                                  _.startScrolling(element, 'x');
                                                              
                                                              
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 5 hrs to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 530..540

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

                                                              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

                                                                i.event.bind(i.scrollbarY, 'mousedown', function (e) {
                                                                  currentPageY = e.pageY;
                                                                  currentTop = _.toInt(dom.css(i.scrollbarY, 'top')) * i.railYRatio;
                                                                  _.startScrolling(element, 'y');
                                                              
                                                              
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 5 hrs to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 485..495

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

                                                              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

                                                                i.event.bind(i.scrollbarYRail, 'click', function (e) {
                                                                  var positionTop = e.pageY - window.pageYOffset - pageOffset(i.scrollbarYRail).top;
                                                                  var direction = positionTop > i.scrollbarYTop ? 1 : -1;
                                                              
                                                                  updateScroll(element, 'top', element.scrollTop + direction * i.containerHeight);
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 4 hrs to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 428..436

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

                                                              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

                                                                i.event.bind(i.scrollbarXRail, 'click', function (e) {
                                                                  var positionLeft = e.pageX - window.pageXOffset - pageOffset(i.scrollbarXRail).left;
                                                                  var direction = positionLeft > i.scrollbarXLeft ? 1 : -1;
                                                              
                                                                  updateScroll(element, 'left', element.scrollLeft + direction * i.containerWidth);
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 4 hrs to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 417..425

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

                                                              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 (axis === 'left' && value >= i.contentWidth - i.containerWidth) {
                                                                  // don't allow scroll past container
                                                                  value = i.contentWidth - i.containerWidth;
                                                                  if (value - element.scrollLeft <= 1) {
                                                                    // mitigates rounding errors on non-subpixel scroll values
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 3 hrs to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1478..1488

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

                                                              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 (axis === 'top' && value >= i.contentHeight - i.containerHeight) {
                                                                  // don't allow scroll past container
                                                                  value = i.contentHeight - i.containerHeight;
                                                                  if (value - element.scrollTop <= 1) {
                                                                    // mitigates rounding errors on non-subpixel scroll values
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 3 hrs to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1490..1500

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

                                                              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 (!element.contains(i.scrollbarXRail)) {
                                                                  existingRails = dom.queryChildren(element, '.ps-scrollbar-x-rail');
                                                                  if (existingRails.length > 0) {
                                                                    existingRails.forEach(function (rail) {
                                                                      dom.remove(rail);
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 3 hrs to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1382..1390

                                                              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

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

                                                                if (!element.contains(i.scrollbarYRail)) {
                                                                  existingRails = dom.queryChildren(element, '.ps-scrollbar-y-rail');
                                                                  if (existingRails.length > 0) {
                                                                    existingRails.forEach(function (rail) {
                                                                      dom.remove(rail);
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 3 hrs to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1373..1381

                                                              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

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

                                                                  if (window.PointerEvent) {
                                                                    i.event.bind(window, 'pointerdown', globalTouchStart);
                                                                    i.event.bind(window, 'pointerup', globalTouchEnd);
                                                                    i.event.bind(element, 'pointerdown', touchStart);
                                                                    i.event.bind(element, 'pointermove', touchMove);
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 2 other locations - About 2 hrs to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1131..1151
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1144..1150

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

                                                              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

                                                                  } else if (window.MSPointerEvent) {
                                                                    i.event.bind(window, 'MSPointerDown', globalTouchStart);
                                                                    i.event.bind(window, 'MSPointerUp', globalTouchEnd);
                                                                    i.event.bind(element, 'MSPointerDown', touchStart);
                                                                    i.event.bind(element, 'MSPointerMove', touchMove);
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 2 other locations - About 2 hrs to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1131..1151
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1138..1150

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

                                                              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 (supportsTouch) {
                                                                  i.event.bind(window, 'touchstart', globalTouchStart);
                                                                  i.event.bind(window, 'touchend', globalTouchEnd);
                                                                  i.event.bind(element, 'touchstart', touchStart);
                                                                  i.event.bind(element, 'touchmove', touchMove);
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 2 other locations - About 2 hrs to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1138..1150
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1144..1150

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

                                                              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

                                                              exports.startScrolling = function (element, axis) {
                                                                cls.add(element, 'ps-in-scrolling');
                                                                if (typeof axis !== 'undefined') {
                                                                  cls.add(element, 'ps-' + axis);
                                                                } else {
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 2 hrs to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 332..340

                                                              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

                                                              exports.stopScrolling = function (element, axis) {
                                                                cls.remove(element, 'ps-in-scrolling');
                                                                if (typeof axis !== 'undefined') {
                                                                  cls.remove(element, 'ps-' + axis);
                                                                } else {
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 2 hrs to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 322..330

                                                              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

                                                                  } else if (i.scrollbarYActive && !i.scrollbarXActive) {
                                                                    // only vertical scrollbar is active and useBothWheelAxes option is
                                                                    // active, so let's scroll vertical bar using both mouse wheel axes
                                                                    if (deltaY) {
                                                                      updateScroll(element, 'top', element.scrollTop - (deltaY * i.settings.wheelSpeed));
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 2 hrs to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 816..825

                                                              Duplicated Code

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

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

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

                                                              Tuning

                                                              This issue has a mass of 83.

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

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

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

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

                                                              Refactorings

                                                              Further Reading

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

                                                                  } else if (i.scrollbarXActive && !i.scrollbarYActive) {
                                                                    // useBothWheelAxes and only horizontal bar is active, so use both
                                                                    // wheel axes for horizontal bar
                                                                    if (deltaX) {
                                                                      updateScroll(element, 'left', element.scrollLeft + (deltaX * i.settings.wheelSpeed));
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 2 hrs to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 807..825

                                                              Duplicated Code

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

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

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

                                                              Tuning

                                                              This issue has a mass of 83.

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

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

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

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

                                                              Refactorings

                                                              Further Reading

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

                                                                if (i.scrollbarXActive) {
                                                                  cls.add(element, 'ps-active-x');
                                                                } else {
                                                                  cls.remove(element, 'ps-active-x');
                                                                  i.scrollbarXWidth = 0;
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1429..1436

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

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

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

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

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

                                                              Refactorings

                                                              Further Reading

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

                                                                if (i.scrollbarYActive) {
                                                                  cls.add(element, 'ps-active-y');
                                                                } else {
                                                                  cls.remove(element, 'ps-active-y');
                                                                  i.scrollbarYHeight = 0;
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1421..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 70.

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

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

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

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

                                                              Refactorings

                                                              Further Reading

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

                                                                  case 37: // left
                                                                    if (e.metaKey) {
                                                                      deltaX = -i.contentWidth;
                                                                    } else if (e.altKey) {
                                                                      deltaX = -i.containerWidth;
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 649..657

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

                                                                  case 40: // down
                                                                    if (e.metaKey) {
                                                                      deltaY = -i.contentHeight;
                                                                    } else if (e.altKey) {
                                                                      deltaY = -i.containerHeight;
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 622..630

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

                                                                  if (magnitudeY > magnitudeX) {
                                                                    // user is perhaps trying to swipe up/down the page
                                                              
                                                                    if (((deltaY < 0) && (scrollTop === i.contentHeight - i.containerHeight)) ||
                                                                        ((deltaY > 0) && (scrollTop === 0))) {
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1004..1011

                                                              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

                                                                  } else if (magnitudeX > magnitudeY) {
                                                                    // user is perhaps trying to swipe left/right across the page
                                                              
                                                                    if (((deltaX < 0) && (scrollLeft === i.contentWidth - i.containerWidth)) ||
                                                                        ((deltaX > 0) && (scrollLeft === 0))) {
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 997..1011

                                                              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

                                                                  case 38: // up
                                                                    if (e.metaKey) {
                                                                      deltaY = i.contentHeight;
                                                                    } else if (e.altKey) {
                                                                      deltaY = i.containerHeight;
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 640..648

                                                              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

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

                                                                  case 39: // right
                                                                    if (e.metaKey) {
                                                                      deltaX = i.contentWidth;
                                                                    } else if (e.altKey) {
                                                                      deltaX = i.containerWidth;
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 631..639

                                                              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

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

                                                                    if (maxScrollTop > 0) {
                                                                      if (!(child.scrollTop === 0 && deltaY > 0) && !(child.scrollTop === maxScrollTop && deltaY < 0)) {
                                                                        return true;
                                                                      }
                                                                    }
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 782..786

                                                              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

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

                                                                    if (maxScrollLeft > 0) {
                                                                      if (!(child.scrollLeft === 0 && deltaX < 0) && !(child.scrollLeft === maxScrollLeft && deltaX > 0)) {
                                                                        return true;
                                                                      }
                                                                    }
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 776..780

                                                              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

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

                                                                  if (newLeft < 0) {
                                                                    i.scrollbarXLeft = 0;
                                                                  } else if (newLeft > maxLeft) {
                                                                    i.scrollbarXLeft = maxLeft;
                                                                  } else {
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 506..512

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

                                                              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 (newTop < 0) {
                                                                    i.scrollbarYTop = 0;
                                                                  } else if (newTop > maxTop) {
                                                                    i.scrollbarYTop = maxTop;
                                                                  } else {
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 461..467

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

                                                              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

                                                                i.railYMarginHeight = _.toInt(dom.css(i.scrollbarYRail, 'marginTop')) + _.toInt(dom.css(i.scrollbarYRail, 'marginBottom'));
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1255..1255

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

                                                              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

                                                                i.railBorderXWidth = _.toInt(dom.css(i.scrollbarXRail, 'borderLeftWidth')) + _.toInt(dom.css(i.scrollbarXRail, 'borderRightWidth'));
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1561..1561

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

                                                              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

                                                                i.railXMarginWidth = _.toInt(dom.css(i.scrollbarXRail, 'marginLeft')) + _.toInt(dom.css(i.scrollbarXRail, 'marginRight'));
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 3 other locations - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1275..1275
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1277..1277
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1560..1560

                                                              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

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

                                                                i.railBorderYWidth = _.toInt(dom.css(i.scrollbarYRail, 'borderTopWidth')) + _.toInt(dom.css(i.scrollbarYRail, 'borderBottomWidth'));
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 3 other locations - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1258..1258
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1277..1277
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1560..1560

                                                              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

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

                                                                i.railXMarginWidth = _.toInt(dom.css(i.scrollbarXRail, 'marginLeft')) + _.toInt(dom.css(i.scrollbarXRail, 'marginRight'));
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 3 other locations - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1258..1258
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1275..1275
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1277..1277

                                                              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

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

                                                                i.railYMarginHeight = _.toInt(dom.css(i.scrollbarYRail, 'marginTop')) + _.toInt(dom.css(i.scrollbarYRail, 'marginBottom'));
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 3 other locations - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1258..1258
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1275..1275
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1560..1560

                                                              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

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

                                                              exports.remove = function (element, className) {
                                                                if (element.classList) {
                                                                  element.classList.remove(className);
                                                                } else {
                                                                  oldRemove(element, className);
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 65..71

                                                              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

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

                                                              exports.add = function (element, className) {
                                                                if (element.classList) {
                                                                  element.classList.add(className);
                                                                } else {
                                                                  oldAdd(element, className);
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 73..79

                                                              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

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

                                                                  var maxLeft = Math.max(0, i.scrollbarXRail.getBoundingClientRect().left) + (i.railXRatio * (i.railXWidth - i.scrollbarXWidth));
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 504..504

                                                              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

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

                                                                var mouseMoveHandler = function (e) {
                                                                  updateScrollTop(e.pageY - currentPageY);
                                                                  updateGeometry(element);
                                                                  e.stopPropagation();
                                                                  e.preventDefault();
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 473..478

                                                              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

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

                                                                  var maxTop = Math.max(0, i.scrollbarYRail.getBoundingClientRect().top) + (i.railYRatio * (i.railYHeight - i.scrollbarYHeight));
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 459..459

                                                              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

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

                                                                var mouseMoveHandler = function (e) {
                                                                  updateScrollLeft(e.pageX - currentPageX);
                                                                  updateGeometry(element);
                                                                  e.stopPropagation();
                                                                  e.preventDefault();
                                                              Severity: Major
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 1 hr to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 518..523

                                                              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

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

                                                                  var scrollLeft = _.toInt(i.scrollbarXLeft * (i.contentWidth - i.containerWidth) / (i.containerWidth - (i.railXRatio * i.scrollbarXWidth))) - i.negativeScrollAdjustment;
                                                              Severity: Minor
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 55 mins to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 514..514

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

                                                                if (axis === 'left' && value <= 0) {
                                                                  element.scrollLeft = value = 0; // don't allow negative scroll
                                                                  element.dispatchEvent(createDOMEvent('ps-x-reach-start'));
                                                                }
                                                              Severity: Minor
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 55 mins to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1466..1469

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

                                                                if (axis === 'top' && value <= 0) {
                                                                  element.scrollTop = value = 0; // don't allow negative scroll
                                                                  element.dispatchEvent(createDOMEvent('ps-y-reach-start'));
                                                                }
                                                              Severity: Minor
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 55 mins to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1471..1474

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

                                                                  var scrollTop = _.toInt(i.scrollbarYTop * (i.contentHeight - i.containerHeight) / (i.containerHeight - (i.railYRatio * i.scrollbarYHeight)));
                                                              Severity: Minor
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 55 mins to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 469..469

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

                                                                if (i.scrollbarYTop >= i.railYHeight - i.scrollbarYHeight) {
                                                                  i.scrollbarYTop = i.railYHeight - i.scrollbarYHeight;
                                                                }
                                                              Severity: Minor
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 45 mins to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1412..1414

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

                                                                if (i.scrollbarXLeft >= i.railXWidth - i.scrollbarXWidth) {
                                                                  i.scrollbarXLeft = i.railXWidth - i.scrollbarXWidth;
                                                                }
                                                              Severity: Minor
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 45 mins to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 1415..1417

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

                                                                var mouseUpHandler = function () {
                                                                  _.stopScrolling(element, 'y');
                                                                  i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);
                                                                };
                                                              Severity: Minor
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 30 mins to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 480..483

                                                              Duplicated Code

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

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

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

                                                              Tuning

                                                              This issue has a mass of 45.

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

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

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

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

                                                              Refactorings

                                                              Further Reading

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

                                                                var mouseUpHandler = function () {
                                                                  _.stopScrolling(element, 'x');
                                                                  i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);
                                                                };
                                                              Severity: Minor
                                                              Found in server/lib/minicron/hub/assets/js/perfect-scrollbar.js and 1 other location - About 30 mins to fix
                                                              server/lib/minicron/hub/assets/js/perfect-scrollbar.js on lines 525..528

                                                              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