mambax7/extcal

View on GitHub
assets/js/highslide.js

Summary

Maintainability
F
3 mos
Test Coverage

File highslide.js has 1660 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Name:    Highslide JS
 * Version: 4.1.13 (2011-10-06)
 * Config:  default
 * Author:  Torstein Hønsi
Severity: Major
Found in assets/js/highslide.js - About 4 days to fix

    Consider simplifying this complex logical expression.
    Open

    if (!hs) {
        var hs = {
    // Language strings
            lang: {
                cssDirection: 'ltr',
    Severity: Critical
    Found in assets/js/highslide.js - About 1 day to fix

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

              getInline: function (types, addOverlay) {
                  for (var i = 0; i < types.length; i++) {
                      var type = types[i], s = null;
                      if (!this[type + 'Id'] && this.thumbsUserSetId)
                          this[type + 'Id'] = type + '-for-' + this.thumbsUserSetId;
      Severity: Minor
      Found in assets/js/highslide.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 Expander has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
      Open

          hs.Expander = function (a, params, custom, contentType) {
              if (document.readyState && hs.ie && !hs.isReady) {
                  hs.addEventListener(document, 'ready', function () {
                      new hs.Expander(a, params, custom, contentType);
                  });
      Severity: Minor
      Found in assets/js/highslide.js - About 6 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 mouseClickHandler has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
      Open

              mouseClickHandler: function (e) {
                  if (!e) e = window.event;
                  if (e.button > 1) return true;
                  if (!e.target) e.target = e.srcElement;
      
      
      Severity: Minor
      Found in assets/js/highslide.js - About 6 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 showHideElements has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
      Open

              showHideElements: function (tagName, visibility) {
                  var els = document.getElementsByTagName(tagName);
                  var prop = tagName == '*' ? 'overflow' : 'visibility';
                  for (var i = 0; i < els.length; i++) {
                      if (prop == 'visibility' || (document.defaultView.getComputedStyle(
      Severity: Minor
      Found in assets/js/highslide.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 changeSize has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
      Open

              changeSize: function (up, to, dur) {
      
                  if (this.outline && !this.outlineWhileAnimating) {
                      if (up) this.outline.setPosition();
                      else this.outline.destroy();
      Severity: Minor
      Found in assets/js/highslide.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 justify has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
      Open

              justify: function (p, moveOnly) {
                  var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
      
                  var hasMovedMin = false;
      
      
      Severity: Minor
      Found in assets/js/highslide.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

      hs has 37 functions (exceeds 20 allowed). Consider refactoring.
      Open

          var hs = {
      // Language strings
              lang: {
                  cssDirection: 'ltr',
                  loadingText: 'Loading...',
      Severity: Minor
      Found in assets/js/highslide.js - About 4 hrs to fix

        prototype has 35 functions (exceeds 20 allowed). Consider refactoring.
        Open

            hs.Expander.prototype = {
                error: function (e) {
                    if (hs.debug) alert('Line ' + e.lineNumber + ': ' + e.message);
                    else window.location.href = this.src;
                },
        Severity: Minor
        Found in assets/js/highslide.js - About 4 hrs to fix

          Function keyHandler has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
          Open

                  keyHandler: function (e) {
                      if (!e) e = window.event;
                      if (!e.target) e.target = e.srcElement; // ie
                      if (typeof e.target.form != 'undefined') return true; // form element has focus
                      var exp = hs.getExpander();
          Severity: Minor
          Found in assets/js/highslide.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 getWrapperKey has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

                  getWrapperKey: function (element, expOnly) {
                      var el, re = /^highslide-wrapper-([0-9]+)$/;
                      // 1. look in open expanders
                      el = element;
                      while (el.parentNode) {
          Severity: Minor
          Found in assets/js/highslide.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 onGraphicLoad has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

                  onGraphicLoad: function () {
                      var o = this.offset = this.graphic.width / 4,
                          pos = [[0, 0], [0, -4], [-2, 0], [0, -8], 0, [-2, -8], [0, -2], [0, -6], [-2, -2]],
                          dim = {height: (2 * o) + 'px', width: (2 * o) + 'px'};
                      for (var i = 0; i <= 8; i++) {
          Severity: Minor
          Found in assets/js/highslide.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 sizeOverlayBox has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
          Open

                  sizeOverlayBox: function (doWrapper, doPanels) {
                      var overlayBox = this.overlayBox,
                          x = this.x,
                          y = this.y;
                      hs.setStyles(overlayBox, {
          Severity: Minor
          Found in assets/js/highslide.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 correctRatio has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
          Open

                  correctRatio: function (ratio) {
                      var x = this.x,
                          y = this.y,
                          changed = false,
                          xSize = Math.min(x.full, x.size),
          Severity: Minor
          Found in assets/js/highslide.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 Expander has 75 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              hs.Expander = function (a, params, custom, contentType) {
                  if (document.readyState && hs.ie && !hs.isReady) {
                      hs.addEventListener(document, 'ready', function () {
                          new hs.Expander(a, params, custom, contentType);
                      });
          Severity: Major
          Found in assets/js/highslide.js - About 3 hrs to fix

            Function focus has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
            Open

                    focus: function () {
                        this.wrapper.style.zIndex = hs.zIndexCounter += 2;
                        // blur others
                        for (var i = 0; i < hs.expanders.length; i++) {
                            if (hs.expanders[i] && i == hs.focusKey) {
            Severity: Minor
            Found in assets/js/highslide.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 createOverlay has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
            Open

                    createOverlay: function (o) {
                        var el = o.overlayId;
                        if (typeof el == 'string') el = hs.getNode(el);
                        if (o.html) el = hs.createElement('div', {innerHTML: o.html});
                        if (!el || typeof el == 'string') return;
            Severity: Minor
            Found in assets/js/highslide.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 getOverlays has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
            Open

                    getOverlays: function () {
                        this.getInline(['heading', 'caption'], true);
                        if (this.heading && this.dragByHeading) this.heading.className += ' highslide-move';
                        if (hs.showCredits) this.writeCredits();
                        for (var i = 0; i < hs.overlays.length; i++) {
            Severity: Minor
            Found in assets/js/highslide.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 updateAnchors has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
            Open

                    updateAnchors: function () {
                        var el, els, all = [], images = [], groups = {}, re;
            
                        for (var i = 0; i < hs.openerTagNames.length; i++) {
                            els = document.getElementsByTagName(hs.openerTagNames[i]);
            Severity: Minor
            Found in assets/js/highslide.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 contentLoaded has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
            Open

                    contentLoaded: function () {
                        try {
                            if (!this.content) return;
                            this.content.onload = null;
                            if (this.onLoadStarted) return;
            Severity: Minor
            Found in assets/js/highslide.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 positionOverlay has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
            Open

                    positionOverlay: function (overlay) {
                        var p = overlay.position || 'middle center',
                            offX = overlay.offsetX,
                            offY = overlay.offsetY;
                        if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay);
            Severity: Minor
            Found in assets/js/highslide.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 dragHandler has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
            Open

                    dragHandler: function (e) {
                        if (!hs.dragArgs) return true;
                        if (!e) e = window.event;
                        var a = hs.dragArgs, exp = a.exp;
            
            
            Severity: Minor
            Found in assets/js/highslide.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 wrapperMouseHandler has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
            Open

                    wrapperMouseHandler: function (e) {
                        try {
                            if (!e) e = window.event;
                            var over = /mouseover/i.test(e.type);
                            if (!e.target) e.target = e.srcElement; // ie
            Severity: Minor
            Found in assets/js/highslide.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 step has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
            Open

                    step: function (gotoEnd) {
                        var t = (new Date()).getTime();
                        if (gotoEnd || t >= this.options.duration + this.startTime) {
                            this.now = this.end;
                            this.pos = this.state = 1;
            Severity: Minor
            Found in assets/js/highslide.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 positionOverlay has 56 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    positionOverlay: function (overlay) {
                        var p = overlay.position || 'middle center',
                            offX = overlay.offsetX,
                            offY = overlay.offsetY;
                        if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay);
            Severity: Major
            Found in assets/js/highslide.js - About 2 hrs to fix

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

                      custom: function (from, to, unit) {
                          this.startTime = (new Date()).getTime();
                          this.start = from;
                          this.end = to;
                          this.unit = unit;// || this.unit || "px";
              Severity: Minor
              Found in assets/js/highslide.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 mouseClickHandler has 51 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      mouseClickHandler: function (e) {
                          if (!e) e = window.event;
                          if (e.button > 1) return true;
                          if (!e.target) e.target = e.srcElement;
              
              
              Severity: Major
              Found in assets/js/highslide.js - About 2 hrs to fix

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

                        changeSize: function (up, to, dur) {
                
                            if (this.outline && !this.outlineWhileAnimating) {
                                if (up) this.outline.setPosition();
                                else this.outline.destroy();
                Severity: Minor
                Found in assets/js/highslide.js - About 2 hrs to fix

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

                          init: function () {
                              if (!hs.container) {
                  
                                  hs.ieLt7 = hs.ie && hs.uaVersion < 7;
                                  hs.ieLt9 = hs.ie && hs.uaVersion < 9;
                  Severity: Minor
                  Found in assets/js/highslide.js - About 1 hr to fix

                    Function contentLoaded has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            contentLoaded: function () {
                                try {
                                    if (!this.content) return;
                                    this.content.onload = null;
                                    if (this.onLoadStarted) return;
                    Severity: Minor
                    Found in assets/js/highslide.js - About 1 hr to fix

                      Function correctRatio has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              correctRatio: function (ratio) {
                                  var x = this.x,
                                      y = this.y,
                                      changed = false,
                                      xSize = Math.min(x.full, x.size),
                      Severity: Minor
                      Found in assets/js/highslide.js - About 1 hr to fix

                        Function keyHandler has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                keyHandler: function (e) {
                                    if (!e) e = window.event;
                                    if (!e.target) e.target = e.srcElement; // ie
                                    if (typeof e.target.form != 'undefined') return true; // form element has focus
                                    var exp = hs.getExpander();
                        Severity: Minor
                        Found in assets/js/highslide.js - About 1 hr to fix

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

                                  get: function (key) {
                                      switch (key) {
                                          case 'loadingPos':
                                              return this.tpos + this.tb + (this.t - hs.loading['offset' + this.ucwh]) / 2;
                                          case 'wsize':
                          Severity: Minor
                          Found in assets/js/highslide.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 css has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                          Open

                                  css: function (el, prop) {
                                      if (el.style[prop]) {
                                          return el.style[prop];
                                      } else if (document.defaultView) {
                                          return document.defaultView.getComputedStyle(el, null).getPropertyValue(prop);
                          Severity: Minor
                          Found in assets/js/highslide.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 Outline has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                          Open

                              hs.Outline = function (outlineType, onLoad) {
                                  this.onLoad = onLoad;
                                  this.outlineType = outlineType;
                                  var v = hs.uaVersion, tr;
                          
                          
                          Severity: Minor
                          Found in assets/js/highslide.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 showHideElements has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  showHideElements: function (tagName, visibility) {
                                      var els = document.getElementsByTagName(tagName);
                                      var prop = tagName == '*' ? 'overflow' : 'visibility';
                                      for (var i = 0; i < els.length; i++) {
                                          if (prop == 'visibility' || (document.defaultView.getComputedStyle(
                          Severity: Minor
                          Found in assets/js/highslide.js - About 1 hr to fix

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

                                    getPageSize: function () {
                                        var d = document, w = window, iebody = d.compatMode && d.compatMode != 'BackCompat'
                                                ? d.documentElement : d.body,
                                            ieLt9 = hs.ie && (hs.uaVersion < 9 || typeof pageXOffset == 'undefined');
                            
                            
                            Severity: Minor
                            Found in assets/js/highslide.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 init has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                            Open

                                    init: function () {
                                        if (!hs.container) {
                            
                                            hs.ieLt7 = hs.ie && hs.uaVersion < 7;
                                            hs.ieLt9 = hs.ie && hs.uaVersion < 9;
                            Severity: Minor
                            Found in assets/js/highslide.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 onGraphicLoad has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    onGraphicLoad: function () {
                                        var o = this.offset = this.graphic.width / 4,
                                            pos = [[0, 0], [0, -4], [-2, 0], [0, -8], 0, [-2, -8], [0, -2], [0, -6], [-2, -2]],
                                            dim = {height: (2 * o) + 'px', width: (2 * o) + 'px'};
                                        for (var i = 0; i <= 8; i++) {
                            Severity: Minor
                            Found in assets/js/highslide.js - About 1 hr to fix

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

                                      getInline: function (types, addOverlay) {
                                          for (var i = 0; i < types.length; i++) {
                                              var type = types[i], s = null;
                                              if (!this[type + 'Id'] && this.thumbsUserSetId)
                                                  this[type + 'Id'] = type + '-for-' + this.thumbsUserSetId;
                              Severity: Minor
                              Found in assets/js/highslide.js - About 1 hr to fix

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

                                        createOverlay: function (o) {
                                            var el = o.overlayId;
                                            if (typeof el == 'string') el = hs.getNode(el);
                                            if (o.html) el = hs.createElement('div', {innerHTML: o.html});
                                            if (!el || typeof el == 'string') return;
                                Severity: Minor
                                Found in assets/js/highslide.js - About 1 hr to fix

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

                                          focusTopmost: function () {
                                              var topZ = 0,
                                                  topmostKey = -1,
                                                  expanders = hs.expanders,
                                                  exp,
                                  Severity: Minor
                                  Found in assets/js/highslide.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 setPosition has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                          setPosition: function (pos, offset, vis, dur, easing) {
                                              var exp = this.exp,
                                                  stl = exp.wrapper.style,
                                                  offset = offset || 0,
                                                  pos = pos || {
                                  Severity: Minor
                                  Found in assets/js/highslide.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 calcExpanded has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                          calcExpanded: function () {
                                              var exp = this.exp;
                                              this.justify = 'auto';
                                  
                                  
                                  
                                  Severity: Minor
                                  Found in assets/js/highslide.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 justify has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          justify: function (p, moveOnly) {
                                              var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
                                  
                                              var hasMovedMin = false;
                                  
                                  
                                  Severity: Minor
                                  Found in assets/js/highslide.js - About 1 hr to fix

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

                                            sizeOverlayBox: function (doWrapper, doPanels) {
                                                var overlayBox = this.overlayBox,
                                                    x = this.x,
                                                    y = this.y;
                                                hs.setStyles(overlayBox, {
                                    Severity: Minor
                                    Found in assets/js/highslide.js - About 1 hr to fix

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

                                          hs.Outline = function (outlineType, onLoad) {
                                              this.onLoad = onLoad;
                                              this.outlineType = outlineType;
                                              var v = hs.uaVersion, tr;
                                      
                                      
                                      Severity: Minor
                                      Found in assets/js/highslide.js - About 1 hr to fix

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

                                                fitOverlayBox: function (ratio, changed) {
                                                    var x = this.x, y = this.y;
                                                    if (this.overlayBox) {
                                                        while (y.size > this.minHeight && x.size > this.minWidth
                                                        && y.get('wsize') > y.get('fitsize')) {
                                        Severity: Minor
                                        Found in assets/js/highslide.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 animate has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                                animate: function (el, prop, opt) {
                                                    var start,
                                                        end,
                                                        unit;
                                                    if (typeof opt != 'object' || opt === null) {
                                        Severity: Minor
                                        Found in assets/js/highslide.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 imageCreate has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                                imageCreate: function () {
                                                    var exp = this;
                                        
                                                    var img = document.createElement('img');
                                                    this.content = img;
                                        Severity: Minor
                                        Found in assets/js/highslide.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

                                        Consider simplifying this complex logical expression.
                                        Open

                                                    if (!hs.container) {
                                        
                                                        hs.ieLt7 = hs.ie && hs.uaVersion < 7;
                                                        hs.ieLt9 = hs.ie && hs.uaVersion < 9;
                                        
                                        
                                        Severity: Major
                                        Found in assets/js/highslide.js - About 1 hr to fix

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

                                                  transit: function (adj, exp) {
                                                      var last = exp || hs.getExpander();
                                                      exp = last;
                                                      if (hs.upcoming) return false;
                                                      else hs.last = last;
                                          Severity: Minor
                                          Found in assets/js/highslide.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

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

                                                  getAnchorIndex: function () {
                                                      var arr = hs.getAnchors().groups[this.slideshowGroup || 'none'];
                                                      if (arr) for (var i = 0; i < arr.length; i++) {
                                                          if (arr[i] == this.a) return i;
                                                      }
                                          Severity: Minor
                                          Found in assets/js/highslide.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

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

                                                  setStyles: function (el, styles) {
                                                      for (var x in styles) {
                                                          if (hs.ieLt9 && x == 'opacity') {
                                                              if (styles[x] > 0.99) el.style.removeAttribute('filter');
                                                              else el.style.filter = 'alpha(opacity=' + (styles[x] * 100) + ')';
                                          Severity: Minor
                                          Found in assets/js/highslide.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

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

                                                  genOverlayBox: function () {
                                                      if (!this.overlayBox) this.overlayBox = hs.createElement(
                                                          'div', {
                                                              className: this.wrapperClassName
                                                          }, {
                                          Severity: Minor
                                          Found in assets/js/highslide.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

                                          Function createElement has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                                  createElement: function (tag, attribs, styles, parent, nopad) {
                                                      var el = document.createElement(tag);
                                                      if (attribs) hs.extend(el, attribs);
                                                      if (nopad) hs.setStyles(el, {padding: 0, border: 'none', margin: 0});
                                                      if (styles) hs.setStyles(el, styles);
                                          Severity: Minor
                                          Found in assets/js/highslide.js - About 45 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

                                          Function addEventListener has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                                  addEventListener: function (el, event, func) {
                                                      if (el == document && event == 'ready') {
                                                          hs.push(hs.onReady, func);
                                                      }
                                                      try {
                                          Severity: Minor
                                          Found in assets/js/highslide.js - About 45 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

                                          Function setSize has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                                  setSize: function (i) {
                                                      var exp = this.exp;
                                                      if (exp.isImage && (exp.useBox || hs.padToMinWidth)) {
                                                          this.imgSize = i;
                                                          this.size = Math.max(this.size, this.imgSize);
                                          Severity: Minor
                                          Found in assets/js/highslide.js - About 45 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

                                          Function preloadImages has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                                  preloadImages: function (number) {
                                                      if (number && typeof number != 'object') hs.numberOfImagesToPreload = number;
                                          
                                                      var arr = hs.getAnchors();
                                                      for (var i = 0; i < arr.images.length && i < hs.numberOfImagesToPreload; i++) {
                                          Severity: Minor
                                          Found in assets/js/highslide.js - About 45 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 deeply nested control flow statements.
                                          Open

                                                              } else if (visibility == 'hidden') { // hide if behind
                                                                  var elPos = hs.getPosition(els[i]);
                                                                  elPos.w = els[i].offsetWidth;
                                                                  elPos.h = els[i].offsetHeight;
                                          
                                          
                                          Severity: Major
                                          Found in assets/js/highslide.js - About 45 mins to fix

                                            Avoid deeply nested control flow statements.
                                            Open

                                                                    if (!groups[g]) groups[g] = [];
                                            Severity: Major
                                            Found in assets/js/highslide.js - About 45 mins to fix

                                              Avoid deeply nested control flow statements.
                                              Open

                                                                      if (ie6) {
                                                                          o.style.width = (overlayBox.offsetWidth + 2 * x.cb
                                                                              + x.p1 + x.p2) + 'px';
                                                                      }
                                              Severity: Major
                                              Found in assets/js/highslide.js - About 45 mins to fix

                                                Avoid deeply nested control flow statements.
                                                Open

                                                                    if (!hasDragged && !hs.hasFocused && !/(move|resize)/.test(hs.dragArgs.type)) {
                                                                        exp.close();
                                                                    }
                                                                    else if (hasDragged || (!hasDragged && hs.hasHtmlExpanders)) {
                                                                        hs.dragArgs.exp.doShowHide('hidden');
                                                Severity: Major
                                                Found in assets/js/highslide.js - About 45 mins to fix

                                                  Avoid deeply nested control flow statements.
                                                  Open

                                                                          if (re[0] == 'hs.expand') hs.push(images, el);
                                                  Severity: Major
                                                  Found in assets/js/highslide.js - About 45 mins to fix

                                                    Function doFullExpand has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                            doFullExpand: function () {
                                                                try {
                                                                    if (this.fullExpandLabel) hs.discardElement(this.fullExpandLabel);
                                                    
                                                                    this.focus();
                                                    Severity: Minor
                                                    Found in assets/js/highslide.js - About 45 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 deeply nested control flow statements.
                                                    Open

                                                                        if (hs.styleRestoreCursor && hs.dragArgs.type == 'image')
                                                                            hs.dragArgs.exp.content.style.cursor = hs.styleRestoreCursor;
                                                    Severity: Major
                                                    Found in assets/js/highslide.js - About 45 mins to fix

                                                      Function showOverlays has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                      Open

                                                              showOverlays: function () {
                                                                  var b = this.overlayBox;
                                                                  b.className = '';
                                                                  hs.setStyles(b, {
                                                                      top: (this.y.p1 + this.y.cb) + 'px',
                                                      Severity: Minor
                                                      Found in assets/js/highslide.js - About 45 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 deeply nested control flow statements.
                                                      Open

                                                                      } else if (/highslide-image-blur/.test(el.className)) {
                                                                          el.style.cursor = hs.styleRestoreCursor;
                                                                      }
                                                      Severity: Major
                                                      Found in assets/js/highslide.js - About 45 mins to fix

                                                        Avoid deeply nested control flow statements.
                                                        Open

                                                                                for (var key = 0; key < hs.expanders.length; key++) {
                                                                                    var exp = hs.expanders[key];
                                                                                    if (exp && exp.a == el) return key;
                                                                                }
                                                        Severity: Major
                                                        Found in assets/js/highslide.js - About 45 mins to fix

                                                          Avoid deeply nested control flow statements.
                                                          Open

                                                                                  if (!hiddenBy) els[i].style[prop] = els[i].origProp;
                                                          Severity: Major
                                                          Found in assets/js/highslide.js - About 45 mins to fix

                                                            Avoid deeply nested control flow statements.
                                                            Open

                                                                                    while (next && !hs.isHsAnchor(next)) {
                                                                                        if ((new RegExp('highslide-' + type)).test(next.className || null)) {
                                                                                            if (!next.id) this.a['_' + type + 'Id'] = next.id = 'hsId' + hs.idCounter++;
                                                                                            this[type] = hs.getNode(next.id);
                                                                                            break;
                                                            Severity: Major
                                                            Found in assets/js/highslide.js - About 45 mins to fix

                                                              Consider simplifying this complex logical expression.
                                                              Open

                                                                              if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId)
                                                                                  || (sg && sg === this.slideshowGroup)) {
                                                                                  this.createOverlay(o);
                                                                              }
                                                              Severity: Major
                                                              Found in assets/js/highslide.js - About 40 mins to fix

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

                                                                        createElement: function (tag, attribs, styles, parent, nopad) {
                                                                Severity: Minor
                                                                Found in assets/js/highslide.js - About 35 mins to fix

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

                                                                          setPosition: function (pos, offset, vis, dur, easing) {
                                                                  Severity: Minor
                                                                  Found in assets/js/highslide.js - About 35 mins to fix

                                                                    Function close has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                    Open

                                                                            close: function () {
                                                                                if (this.isClosing || !this.isExpanded) return;
                                                                                this.isClosing = true;
                                                                    
                                                                                hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
                                                                    Severity: Minor
                                                                    Found in assets/js/highslide.js - About 35 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

                                                                    Function getExpander has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                    Open

                                                                            getExpander: function (el, expOnly) {
                                                                                if (typeof el == 'undefined') return hs.expanders[hs.focusKey] || null;
                                                                                if (typeof el == 'number') return hs.expanders[el] || null;
                                                                                if (typeof el == 'string') el = hs.$(el);
                                                                                return hs.expanders[hs.getWrapperKey(el, expOnly)] || null;
                                                                    Severity: Minor
                                                                    Found in assets/js/highslide.js - About 35 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

                                                                    Function getParam has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                    Open

                                                                            getParam: function (a, param) {
                                                                                a.getParams = a.onclick;
                                                                                var p = a.getParams ? a.getParams() : null;
                                                                                a.getParams = null;
                                                                    
                                                                    
                                                                    Severity: Minor
                                                                    Found in assets/js/highslide.js - About 35 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

                                                                    Function resize has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                    Open

                                                                            resize: function (e) {
                                                                                var w, h, r = e.width / e.height;
                                                                                w = Math.max(e.width + e.dX, Math.min(this.minWidth, this.x.full));
                                                                                if (this.isImage && Math.abs(w - this.x.full) < 12) w = this.x.full;
                                                                                h = w / r;
                                                                    Severity: Minor
                                                                    Found in assets/js/highslide.js - About 35 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 false;
                                                                    Severity: Major
                                                                    Found in assets/js/highslide.js - About 30 mins to fix

                                                                      Avoid too many return statements within this function.
                                                                      Open

                                                                                  return true;
                                                                      Severity: Major
                                                                      Found in assets/js/highslide.js - About 30 mins to fix

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

                                                                            hs.Dimension = function (exp, dim) {
                                                                                this.exp = exp;
                                                                                this.dim = dim;
                                                                                this.ucwh = dim == 'x' ? 'Width' : 'Height';
                                                                                this.wh = this.ucwh.toLowerCase();
                                                                        Severity: Minor
                                                                        Found in assets/js/highslide.js - About 25 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

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

                                                                                doShowHide: function (visibility) {
                                                                                    if (hs.hideSelects) this.showHideElements('SELECT', visibility);
                                                                                    if (hs.hideIframes) this.showHideElements('IFRAME', visibility);
                                                                                    if (hs.geckoMac) this.showHideElements('*', visibility);
                                                                                },
                                                                        Severity: Minor
                                                                        Found in assets/js/highslide.js - About 25 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

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

                                                                                expand: function (a, params, custom, type) {
                                                                                    if (!a) a = hs.createElement('a', null, {display: 'none'}, hs.container);
                                                                                    if (typeof a.getParams == 'function') return params;
                                                                                    try {
                                                                                        new hs.Expander(a, params, custom);
                                                                        Severity: Minor
                                                                        Found in assets/js/highslide.js - About 25 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

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

                                                                                getPosition: function (el) {
                                                                                    var p = {x: el.offsetLeft, y: el.offsetTop};
                                                                                    while (el.offsetParent) {
                                                                                        el = el.offsetParent;
                                                                                        p.x += el.offsetLeft;
                                                                        Severity: Minor
                                                                        Found in assets/js/highslide.js - About 25 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

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

                                                                            hs.Outline.prototype = {
                                                                                preloadGraphic: function () {
                                                                                    var src = hs.graphicsDir + (hs.outlinesDir || "outlines/") + this.outlineType + ".png";
                                                                        
                                                                                    var appendTo = hs.safari && hs.uaVersion < 525 ? hs.container : null;
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 1 wk to fix
                                                                        assets/js/highslide-full.js on lines 1149..1240
                                                                        assets/js/highslide-with-gallery.js on lines 969..1060

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 1286.

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

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

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                                            hs.fx.prototype = {
                                                                                update: function () {
                                                                                    (hs.fx.step[this.prop] || hs.fx.step._default)(this);
                                                                        
                                                                                    if (this.options.step)
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 4 days to fix
                                                                        assets/js/highslide-full.js on lines 1024..1090
                                                                        assets/js/highslide-with-gallery.js on lines 844..910

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 741.

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

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

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                                                mouseClickHandler: function (e) {
                                                                                    if (!e) e = window.event;
                                                                                    if (e.button > 1) return true;
                                                                                    if (!e.target) e.target = e.srcElement;
                                                                        
                                                                        
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 1 other location - About 3 days to fix
                                                                        assets/js/highslide-with-gallery.js on lines 570..631

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 671.

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

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

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                                                correctRatio: function (ratio) {
                                                                                    var x = this.x,
                                                                                        y = this.y,
                                                                                        changed = false,
                                                                                        xSize = Math.min(x.full, x.size),
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 3 days to fix
                                                                        assets/js/highslide-full.js on lines 1923..1971
                                                                        assets/js/highslide-with-gallery.js on lines 1464..1512

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 560.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                focus: function () {
                                                                                    this.wrapper.style.zIndex = hs.zIndexCounter += 2;
                                                                                    // blur others
                                                                                    for (var i = 0; i < hs.expanders.length; i++) {
                                                                                        if (hs.expanders[i] && i == hs.focusKey) {
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 1 other location - About 2 days to fix
                                                                        assets/js/highslide-with-gallery.js on lines 2029..2055

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 438.

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

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

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                                                sizeOverlayBox: function (doWrapper, doPanels) {
                                                                                    var overlayBox = this.overlayBox,
                                                                                        x = this.x,
                                                                                        y = this.y;
                                                                                    hs.setStyles(overlayBox, {
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 2 days to fix
                                                                        assets/js/highslide-full.js on lines 2854..2886
                                                                        assets/js/highslide-with-gallery.js on lines 2269..2301

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 415.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                            hs.Outline = function (outlineType, onLoad) {
                                                                                this.onLoad = onLoad;
                                                                                this.outlineType = outlineType;
                                                                                var v = hs.uaVersion, tr;
                                                                        
                                                                        
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 2 days to fix
                                                                        assets/js/highslide-full.js on lines 1111..1147
                                                                        assets/js/highslide-with-gallery.js on lines 931..967

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 374.

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

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

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                                                wrapperMouseHandler: function (e) {
                                                                                    try {
                                                                                        if (!e) e = window.event;
                                                                                        var over = /mouseover/i.test(e.type);
                                                                                        if (!e.target) e.target = e.srcElement; // ie
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 1 other location - About 1 day to fix
                                                                        assets/js/highslide-with-gallery.js on lines 656..676

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 346.

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

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

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                                                dragHandler: function (e) {
                                                                                    if (!hs.dragArgs) return true;
                                                                                    if (!e) e = window.event;
                                                                                    var a = hs.dragArgs, exp = a.exp;
                                                                        
                                                                        
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 1 other location - About 1 day to fix
                                                                        assets/js/highslide-with-gallery.js on lines 633..654

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 337.

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

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

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                                                showOverlays: function () {
                                                                                    var b = this.overlayBox;
                                                                                    b.className = '';
                                                                                    hs.setStyles(b, {
                                                                                        top: (this.y.p1 + this.y.cb) + 'px',
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 1 day to fix
                                                                        assets/js/highslide-full.js on lines 2888..2907
                                                                        assets/js/highslide-with-gallery.js on lines 2303..2322

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 313.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                updateAnchors: function () {
                                                                                    var el, els, all = [], images = [], groups = {}, re;
                                                                        
                                                                                    for (var i = 0; i < hs.openerTagNames.length; i++) {
                                                                                        els = document.getElementsByTagName(hs.openerTagNames[i]);
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 1 other location - About 1 day to fix
                                                                        assets/js/highslide-with-gallery.js on lines 804..824

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 281.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                imageCreate: function () {
                                                                                    var exp = this;
                                                                        
                                                                                    var img = document.createElement('img');
                                                                                    this.content = img;
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 1 day to fix
                                                                        assets/js/highslide-full.js on lines 1501..1526
                                                                        assets/js/highslide-with-gallery.js on lines 1301..1326

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 267.

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

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

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                                                doFullExpand: function () {
                                                                                    try {
                                                                                        if (this.fullExpandLabel) hs.discardElement(this.fullExpandLabel);
                                                                        
                                                                                        this.focus();
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 1 other location - About 1 day to fix
                                                                        assets/js/highslide-with-gallery.js on lines 2359..2380

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 263.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                animate: function (el, prop, opt) {
                                                                                    var start,
                                                                                        end,
                                                                                        unit;
                                                                                    if (typeof opt != 'object' || opt === null) {
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 1 day to fix
                                                                        assets/js/highslide-full.js on lines 253..277
                                                                        assets/js/highslide-with-gallery.js on lines 207..231

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 259.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                    hs.animate(this.wrapper, to.wrapper, {
                                                                                        duration: dur,
                                                                                        easing: easing,
                                                                                        step: function (val, args) {
                                                                                            if (exp.outline && exp.outlineWhileAnimating && args.prop == 'top') {
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 1 other location - About 1 day to fix
                                                                        assets/js/highslide-with-gallery.js on lines 1597..1612

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 249.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                resize: function (e) {
                                                                                    var w, h, r = e.width / e.height;
                                                                                    w = Math.max(e.width + e.dX, Math.min(this.minWidth, this.x.full));
                                                                                    if (this.isImage && Math.abs(w - this.x.full) < 12) w = this.x.full;
                                                                                    h = w / r;
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 1 other location - About 1 day to fix
                                                                        assets/js/highslide-with-gallery.js on lines 2060..2070

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 238.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                calcThumb: function () {
                                                                                    this.t = this.exp.el[this.wh] ? parseInt(this.exp.el[this.wh]) :
                                                                                        this.exp.el['offset' + this.ucwh];
                                                                                    this.tpos = this.exp.tpos[this.dim];
                                                                                    this.tb = (this.exp.el['offset' + this.ucwh] - this.t) / 2;
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 1 day to fix
                                                                        assets/js/highslide-full.js on lines 1281..1290
                                                                        assets/js/highslide-with-gallery.js on lines 1101..1110

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 230.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                preloadImages: function (number) {
                                                                                    if (number && typeof number != 'object') hs.numberOfImagesToPreload = number;
                                                                        
                                                                                    var arr = hs.getAnchors();
                                                                                    for (var i = 0; i < arr.images.length && i < hs.numberOfImagesToPreload; i++) {
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 1 day to fix
                                                                        assets/js/highslide-full.js on lines 890..908
                                                                        assets/js/highslide-with-gallery.js on lines 715..733

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 227.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                        if (!this[type] && !s) {
                                                                                            this[type] = hs.getNode(this.a['_' + type + 'Id']);
                                                                                            if (!this[type]) {
                                                                                                var next = this.a.nextSibling;
                                                                                                while (next && !hs.isHsAnchor(next)) {
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 1 day to fix
                                                                        assets/js/highslide-full.js on lines 2453..2466
                                                                        assets/js/highslide-with-gallery.js on lines 1948..1961

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 220.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                    try {
                                                                                        this.content.style.cursor = 'default';
                                                                                        this.changeSize(
                                                                                            0, {
                                                                                                wrapper: {
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 1 other location - About 1 day to fix
                                                                        assets/js/highslide-with-gallery.js on lines 2088..2108

                                                                        Duplicated Code

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

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

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 3 locations. Consider refactoring.
                                                                        Open

                                                                                getPageSize: function () {
                                                                                    var d = document, w = window, iebody = d.compatMode && d.compatMode != 'BackCompat'
                                                                                            ? d.documentElement : d.body,
                                                                                        ieLt9 = hs.ie && (hs.uaVersion < 9 || typeof pageXOffset == 'undefined');
                                                                        
                                                                        
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 1 day to fix
                                                                        assets/js/highslide-full.js on lines 298..313
                                                                        assets/js/highslide-with-gallery.js on lines 252..267

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 199.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                            hs.Dimension = function (exp, dim) {
                                                                                this.exp = exp;
                                                                                this.dim = dim;
                                                                                this.ucwh = dim == 'x' ? 'Width' : 'Height';
                                                                                this.wh = this.ucwh.toLowerCase();
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 7 hrs to fix
                                                                        assets/js/highslide-full.js on lines 1242..1252
                                                                        assets/js/highslide-with-gallery.js on lines 1062..1072

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 188.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                css: function (el, prop) {
                                                                                    if (el.style[prop]) {
                                                                                        return el.style[prop];
                                                                                    } else if (document.defaultView) {
                                                                                        return document.defaultView.getComputedStyle(el, null).getPropertyValue(prop);
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 7 hrs to fix
                                                                        assets/js/highslide-full.js on lines 278..296
                                                                        assets/js/highslide-with-gallery.js on lines 232..250

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 185.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                            hs.extend(hs.fx, {
                                                                                step: {
                                                                        
                                                                                    opacity: function (fx) {
                                                                                        hs.setStyles(fx.elem, {opacity: fx.now});
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 7 hrs to fix
                                                                        assets/js/highslide-full.js on lines 1092..1109
                                                                        assets/js/highslide-with-gallery.js on lines 912..929

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 180.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                focusTopmost: function () {
                                                                                    var topZ = 0,
                                                                                        topmostKey = -1,
                                                                                        expanders = hs.expanders,
                                                                                        exp,
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 6 hrs to fix
                                                                        assets/js/highslide-full.js on lines 457..475
                                                                        assets/js/highslide-with-gallery.js on lines 315..333

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 170.

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

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

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                                                genOverlayBox: function () {
                                                                                    if (!this.overlayBox) this.overlayBox = hs.createElement(
                                                                                        'div', {
                                                                                            className: this.wrapperClassName
                                                                                        }, {
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 6 hrs to fix
                                                                        assets/js/highslide-full.js on lines 2837..2853
                                                                        assets/js/highslide-with-gallery.js on lines 2252..2268

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 164.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                fitOverlayBox: function (ratio, changed) {
                                                                                    var x = this.x, y = this.y;
                                                                                    if (this.overlayBox) {
                                                                                        while (y.size > this.minHeight && x.size > this.minWidth
                                                                                        && y.get('wsize') > y.get('fitsize')) {
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 1 other location - About 6 hrs to fix
                                                                        assets/js/highslide-with-gallery.js on lines 1513..1525

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 158.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                    this.changeSize(
                                                                                        1, {
                                                                                            wrapper: {
                                                                                                width: x.get('wsize'),
                                                                                                height: y.get('wsize'),
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 5 hrs to fix
                                                                        assets/js/highslide-full.js on lines 2002..2018
                                                                        assets/js/highslide-with-gallery.js on lines 1533..1549

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 152.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                getPosition: function (el) {
                                                                                    var p = {x: el.offsetLeft, y: el.offsetTop};
                                                                                    while (el.offsetParent) {
                                                                                        el = el.offsetParent;
                                                                                        p.x += el.offsetLeft;
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 1 other location - About 5 hrs to fix
                                                                        assets/js/highslide-with-gallery.js on lines 269..281

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 149.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                addEventListener: function (el, event, func) {
                                                                                    if (el == document && event == 'ready') {
                                                                                        hs.push(hs.onReady, func);
                                                                                    }
                                                                                    try {
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 5 hrs to fix
                                                                        assets/js/highslide-full.js on lines 852..866
                                                                        assets/js/highslide-with-gallery.js on lines 677..691

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 136.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                getNode: function (id) {
                                                                                    var node = hs.$(id), clone = hs.clones[id], a = {};
                                                                                    if (!node && !clone) return null;
                                                                                    if (!clone) {
                                                                                        clone = node.cloneNode(true);
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 4 hrs to fix
                                                                        assets/js/highslide-full.js on lines 492..503
                                                                        assets/js/highslide-with-gallery.js on lines 350..361

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 128.

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

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

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                                                setStyles: function (el, styles) {
                                                                                    for (var x in styles) {
                                                                                        if (hs.ieLt9 && x == 'opacity') {
                                                                                            if (styles[x] > 0.99) el.style.removeAttribute('filter');
                                                                                            else el.style.filter = 'alpha(opacity=' + (styles[x] * 100) + ')';
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 4 hrs to fix
                                                                        assets/js/highslide-full.js on lines 244..252
                                                                        assets/js/highslide-with-gallery.js on lines 198..206

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 123.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                preloadFullImage: function (i) {
                                                                                    if (hs.continuePreloading && hs.preloadTheseImages[i] && hs.preloadTheseImages[i] != 'undefined') {
                                                                                        var img = document.createElement('img');
                                                                                        img.onload = function () {
                                                                                            img = null;
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 4 hrs to fix
                                                                        assets/js/highslide-full.js on lines 880..889
                                                                        assets/js/highslide-with-gallery.js on lines 705..714

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 122.

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

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

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                                                    for (var i = 0; i < hs.overlays.length; i++) {
                                                                                        var o = hs.overlays[i], tId = o.thumbnailId, sg = o.slideshowGroup;
                                                                                        if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId)
                                                                                            || (sg && sg === this.slideshowGroup)) {
                                                                                            this.createOverlay(o);
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 1 other location - About 4 hrs to fix
                                                                        assets/js/highslide-with-gallery.js on lines 2236..2242

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 122.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                getExpander: function (el, expOnly) {
                                                                                    if (typeof el == 'undefined') return hs.expanders[hs.focusKey] || null;
                                                                                    if (typeof el == 'number') return hs.expanders[el] || null;
                                                                                    if (typeof el == 'string') el = hs.$(el);
                                                                                    return hs.expanders[hs.getWrapperKey(el, expOnly)] || null;
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 4 hrs to fix
                                                                        assets/js/highslide-full.js on lines 698..703
                                                                        assets/js/highslide-with-gallery.js on lines 554..559

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 115.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                if (!hs.allowMultipleInstances && !hs.upcoming) {
                                                                                    if (hs.expanders[key - 1]) hs.expanders[key - 1].close();
                                                                                    if (typeof hs.focusKey != 'undefined' && hs.expanders[hs.focusKey])
                                                                                        hs.expanders[hs.focusKey].close();
                                                                                }
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 4 hrs to fix
                                                                        assets/js/highslide-full.js on lines 1410..1414
                                                                        assets/js/highslide-with-gallery.js on lines 1214..1218

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 115.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                if (!hs.allowSimultaneousLoading) for (var i = 0; i < hs.expanders.length; i++) {
                                                                                    if (hs.expanders[i] && hs.expanders[i].thumb != el && !hs.expanders[i].onLoadStarted) {
                                                                                        hs.expanders[i].cancelLoading();
                                                                                    }
                                                                                }
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 3 hrs to fix
                                                                        assets/js/highslide-full.js on lines 1404..1408
                                                                        assets/js/highslide-with-gallery.js on lines 1208..1212

                                                                        Duplicated Code

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

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

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 3 locations. Consider refactoring.
                                                                        Open

                                                                                    if (exp.isImage && (exp.useBox || hs.padToMinWidth)) {
                                                                                        this.imgSize = i;
                                                                                        this.size = Math.max(this.size, this.imgSize);
                                                                                        exp.content.style[this.lt] = this.get('imgPad') + 'px';
                                                                                    } else
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 3 hrs to fix
                                                                        assets/js/highslide-full.js on lines 1322..1327
                                                                        assets/js/highslide-with-gallery.js on lines 1142..1147

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 113.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                createElement: function (tag, attribs, styles, parent, nopad) {
                                                                                    var el = document.createElement(tag);
                                                                                    if (attribs) hs.extend(el, attribs);
                                                                                    if (nopad) hs.setStyles(el, {padding: 0, border: 'none', margin: 0});
                                                                                    if (styles) hs.setStyles(el, styles);
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 3 hrs to fix
                                                                        assets/js/highslide-full.js on lines 230..237
                                                                        assets/js/highslide-with-gallery.js on lines 184..191

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 112.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                        for (var x in hs.langDefaults) {
                                                                                            if (typeof hs[x] != 'undefined') hs.lang[x] = hs[x];
                                                                                            else if (typeof hs.lang[x] == 'undefined' && typeof hs.langDefaults[x] != 'undefined')
                                                                                                hs.lang[x] = hs.langDefaults[x];
                                                                                        }
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 3 hrs to fix
                                                                        assets/js/highslide-full.js on lines 919..923
                                                                        assets/js/highslide-with-gallery.js on lines 743..747

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 110.

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

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

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                                                getParam: function (a, param) {
                                                                                    a.getParams = a.onclick;
                                                                                    var p = a.getParams ? a.getParams() : null;
                                                                                    a.getParams = null;
                                                                        
                                                                        
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 3 hrs to fix
                                                                        assets/js/highslide-full.js on lines 477..484
                                                                        assets/js/highslide-with-gallery.js on lines 335..342

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 109.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                        if (addOverlay && this[type]) {
                                                                                            var o = {position: (type == 'heading') ? 'above' : 'below'};
                                                                                            for (var x in this[type + 'Overlay']) o[x] = this[type + 'Overlay'][x];
                                                                                            o.overlayId = this[type];
                                                                                            this.createOverlay(o);
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 3 hrs to fix
                                                                        assets/js/highslide-full.js on lines 2472..2477
                                                                        assets/js/highslide-with-gallery.js on lines 1967..1972

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 105.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                    this.mouseIsOver = this.x.pos < mX && mX < this.x.pos + this.x.get('wsize')
                                                                                        && this.y.pos < mY && mY < this.y.pos + this.y.get('wsize');
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 3 hrs to fix
                                                                        assets/js/highslide-full.js on lines 2325..2326
                                                                        assets/js/highslide-with-gallery.js on lines 1824..1825

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 103.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                connectOutline: function () {
                                                                                    var outline = this.outline = hs.pendingOutlines[this.outlineType];
                                                                                    outline.exp = this;
                                                                                    outline.table.style.zIndex = this.wrapper.style.zIndex - 1;
                                                                                    hs.pendingOutlines[this.outlineType] = null;
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 3 hrs to fix
                                                                        assets/js/highslide-full.js on lines 1467..1472
                                                                        assets/js/highslide-with-gallery.js on lines 1270..1275

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 102.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                    for (var i = 0; i < this.overlays.length; i++) {
                                                                                        var o = hs.$('hsId' + this.overlays[i]);
                                                                                        if (/panel$/.test(o.position)) this.positionOverlay(o);
                                                                                        else hs.push(os, o);
                                                                                    }
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 3 hrs to fix
                                                                        assets/js/highslide-full.js on lines 2829..2833
                                                                        assets/js/highslide-with-gallery.js on lines 2244..2248

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 98.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                expand: function (a, params, custom, type) {
                                                                                    if (!a) a = hs.createElement('a', null, {display: 'none'}, hs.container);
                                                                                    if (typeof a.getParams == 'function') return params;
                                                                                    try {
                                                                                        new hs.Expander(a, params, custom);
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 1 other location - About 3 hrs to fix
                                                                        assets/js/highslide-with-gallery.js on lines 283..292

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 98.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                getAnchorIndex: function () {
                                                                                    var arr = hs.getAnchors().groups[this.slideshowGroup || 'none'];
                                                                                    if (arr) for (var i = 0; i < arr.length; i++) {
                                                                                        if (arr[i] == this.a) return i;
                                                                                    }
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
                                                                        assets/js/highslide-full.js on lines 2362..2368
                                                                        assets/js/highslide-with-gallery.js on lines 1860..1866

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 93.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                        hs.loading = hs.createElement('a', {
                                                                                                className: 'highslide-loading',
                                                                                                title: hs.lang.loadingTitle,
                                                                                                innerHTML: hs.lang.loadingText,
                                                                                                href: 'javascript:;'
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
                                                                        assets/js/highslide-full.js on lines 938..949
                                                                        assets/js/highslide-with-gallery.js on lines 762..773

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 88.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                for (var i = 0; i < hs.overrides.length; i++) {
                                                                                    var name = hs.overrides[i];
                                                                                    this[name] = params && typeof params[name] != 'undefined' ?
                                                                                        params[name] : hs[name];
                                                                                }
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
                                                                        assets/js/highslide-full.js on lines 1381..1385
                                                                        assets/js/highslide-with-gallery.js on lines 1186..1190

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 87.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                    var after = up ?
                                                                                        function () {
                                                                        
                                                                                            if (exp.outline) exp.outline.table.style.visibility = "visible";
                                                                                            setTimeout(function () {
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
                                                                        assets/js/highslide-full.js on lines 2048..2058
                                                                        assets/js/highslide-with-gallery.js on lines 1578..1588

                                                                        Duplicated Code

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

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

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 3 locations. Consider refactoring.
                                                                        Open

                                                                            if (hs.ie && window == window.top) {
                                                                                (function () {
                                                                                    try {
                                                                                        document.documentElement.doScroll('left');
                                                                                    } catch (e) {
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
                                                                        assets/js/highslide-full.js on lines 3339..3349
                                                                        assets/js/highslide-with-gallery.js on lines 2633..2643

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 86.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                removeEventListener: function (el, event, func) {
                                                                                    try {
                                                                                        el.removeEventListener(event, func, false);
                                                                                    } catch (e) {
                                                                                        try {
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
                                                                        assets/js/highslide-full.js on lines 868..878
                                                                        assets/js/highslide-with-gallery.js on lines 693..703

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 85.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                setPos: function (i) {
                                                                                    this.pos = i;
                                                                                    this.exp.wrapper.style[this.lt] = i + 'px';
                                                                        
                                                                                    if (this.exp.outline) this.exp.outline.setPosition();
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
                                                                        assets/js/highslide-full.js on lines 1352..1358
                                                                        assets/js/highslide-with-gallery.js on lines 1158..1164

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 83.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                            if (this.isImage && this.x.full > (this.x.imgSize || this.x.size)) {
                                                                                                this.createFullExpand();
                                                                                                if (this.overlays.length == 1) this.sizeOverlayBox();
                                                                                            }
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
                                                                        assets/js/highslide-full.js on lines 1671..1674
                                                                        assets/js/highslide-with-gallery.js on lines 1391..1394

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 83.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                preloadNext: function () {
                                                                                    var next = this.getAdjacentAnchor(1);
                                                                                    if (next && next.onclick.toString().match(/hs\.expand/))
                                                                                        var img = hs.createElement('img', {src: hs.getSrc(next)});
                                                                                },
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
                                                                        assets/js/highslide-full.js on lines 2346..2350
                                                                        assets/js/highslide-with-gallery.js on lines 1844..1848

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 82.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                prepareNextOutline: function () {
                                                                                    var key = this.key;
                                                                                    var outlineType = this.outlineType;
                                                                                    new hs.Outline(outlineType,
                                                                                        function () {
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
                                                                        assets/js/highslide-full.js on lines 2333..2343
                                                                        assets/js/highslide-with-gallery.js on lines 1831..1841

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 81.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                    hs.extend(overlay, {
                                                                                        opacity: 1,
                                                                                        offsetX: 0,
                                                                                        offsetY: 0,
                                                                                        dur: (o.fade === 0 || o.fade === false || (o.fade == 2 && hs.ie)) ? 0 : 250
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
                                                                        assets/js/highslide-full.js on lines 2722..2727
                                                                        assets/js/highslide-with-gallery.js on lines 2140..2145

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 79.

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

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

                                                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                                                                                calcBorders: function () {
                                                                                    // correct for borders
                                                                                    this.cb = (this.exp.content['offset' + this.ucwh] - this.t) / 2;
                                                                        
                                                                                    this.marginMax = hs['margin' + this.ucrb];
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
                                                                        assets/js/highslide-full.js on lines 1275..1280
                                                                        assets/js/highslide-with-gallery.js on lines 1095..1100

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 78.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                resizeTo: function (w, h) {
                                                                                    this.y.setSize(h);
                                                                                    this.x.setSize(w);
                                                                                    this.wrapper.style.height = this.y.get('wsize') + 'px';
                                                                                },
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
                                                                        assets/js/highslide-full.js on lines 2581..2585
                                                                        assets/js/highslide-with-gallery.js on lines 2071..2075

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 77.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                reOrder: function () {
                                                                                    for (var i = 0; i < hs.expanders.length; i++)
                                                                                        if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost();
                                                                                },
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
                                                                        assets/js/highslide-full.js on lines 709..712
                                                                        assets/js/highslide-with-gallery.js on lines 565..568

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 76.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                            hs.fx = function (elem, options, prop) {
                                                                                this.options = options;
                                                                                this.elem = elem;
                                                                                this.prop = prop;
                                                                        
                                                                        
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
                                                                        assets/js/highslide-full.js on lines 1017..1023
                                                                        assets/js/highslide-with-gallery.js on lines 837..843

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 76.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                        hs.setStyles(this.wrapper, {
                                                                                            left: (x.tpos + x.tb - x.cb) + 'px',
                                                                                            top: (y.tpos + x.tb - y.cb) + 'px'
                                                                                        });
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 3 other locations - About 2 hrs to fix
                                                                        assets/js/highslide-full.js on lines 1631..1634
                                                                        assets/js/highslide-full.js on lines 2064..2067
                                                                        assets/js/highslide-with-gallery.js on lines 1354..1357

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 75.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                this.wrapper = hs.createElement(
                                                                                    'div', {
                                                                                        id: 'highslide-wrapper-' + this.key,
                                                                                        className: 'highslide-wrapper ' + this.wrapperClassName
                                                                                    }, {
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 1 hr to fix
                                                                        assets/js/highslide-full.js on lines 1425..1433
                                                                        assets/js/highslide-with-gallery.js on lines 1228..1236

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 74.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                doShowHide: function (visibility) {
                                                                                    if (hs.hideSelects) this.showHideElements('SELECT', visibility);
                                                                                    if (hs.hideIframes) this.showHideElements('IFRAME', visibility);
                                                                                    if (hs.geckoMac) this.showHideElements('*', visibility);
                                                                                },
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 1 hr to fix
                                                                        assets/js/highslide-full.js on lines 2483..2487
                                                                        assets/js/highslide-with-gallery.js on lines 1978..1982

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 73.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                ready: function () {
                                                                                    if (hs.isReady) return;
                                                                                    hs.isReady = true;
                                                                                    for (var i = 0; i < hs.onReady.length; i++) hs.onReady[i]();
                                                                                },
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 1 hr to fix
                                                                        assets/js/highslide-full.js on lines 977..981
                                                                        assets/js/highslide-with-gallery.js on lines 798..802

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 72.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                        if (!this[type] && !this[type + 'Text'] && this[type + 'Eval']) try {
                                                                                            s = eval(this[type + 'Eval']);
                                                                                        } catch (e) {
                                                                                        }
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 1 hr to fix
                                                                        assets/js/highslide-full.js on lines 2446..2449
                                                                        assets/js/highslide-with-gallery.js on lines 1941..1944

                                                                        Duplicated Code

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

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

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

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

                                                                                        hs.container = hs.createElement('div', {
                                                                                                className: 'highslide-container'
                                                                                            }, {
                                                                                                position: 'absolute',
                                                                                                left: 0,
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 1 hr to fix
                                                                        assets/js/highslide-full.js on lines 925..937
                                                                        assets/js/highslide-with-gallery.js on lines 749..761

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 68.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                    if (this.gotOverlays) {
                                                                                        this.positionOverlay(overlay);
                                                                                        if (!overlay.hideOnMouseOut || this.mouseIsOver)
                                                                                            hs.animate(overlay, {opacity: overlay.opacity}, overlay.dur);
                                                                                    }
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 1 hr to fix
                                                                        assets/js/highslide-full.js on lines 2731..2735
                                                                        assets/js/highslide-with-gallery.js on lines 2149..2153

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 67.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                error: function (e) {
                                                                                    if (hs.debug) alert('Line ' + e.lineNumber + ': ' + e.message);
                                                                                    else window.location.href = this.src;
                                                                                },
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 1 hr to fix
                                                                        assets/js/highslide-full.js on lines 1462..1465
                                                                        assets/js/highslide-with-gallery.js on lines 1265..1268

                                                                        Duplicated Code

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

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

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

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

                                                                                if (document.readyState && hs.ie && !hs.isReady) {
                                                                                    hs.addEventListener(document, 'ready', function () {
                                                                                        new hs.Expander(a, params, custom, contentType);
                                                                                    });
                                                                                    return;
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 1 hr to fix
                                                                        assets/js/highslide-full.js on lines 1362..1367
                                                                        assets/js/highslide-with-gallery.js on lines 1168..1173

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 62.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                    if (this.fadeInOut) {
                                                                                        hs.setStyles(this.wrapper, {opacity: up ? 0 : 1});
                                                                                        hs.extend(to.wrapper, {opacity: up});
                                                                                    }
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 1 hr to fix
                                                                        assets/js/highslide-full.js on lines 2069..2072
                                                                        assets/js/highslide-with-gallery.js on lines 1593..1596

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 61.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                    if (up) {
                                                                                        this.wrapper.style.visibility = 'visible';
                                                                                        this.content.style.visibility = 'visible';
                                                                                        this.a.className += ' highslide-active-anchor';
                                                                                    }
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 1 other location - About 1 hr to fix
                                                                        assets/js/highslide-with-gallery.js on lines 1614..1618

                                                                        Duplicated Code

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

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

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

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

                                                                                    setTimeout(function () {
                                                                                            if (exp.loading) hs.setStyles(exp.loading, {left: l, top: t, zIndex: hs.zIndexCounter++})
                                                                                        }
                                                                                        , 100);
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 1 hr to fix
                                                                        assets/js/highslide-full.js on lines 1495..1498
                                                                        assets/js/highslide-with-gallery.js on lines 1295..1298

                                                                        Duplicated Code

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

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

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 3 locations. Consider refactoring.
                                                                        Open

                                                                                        hs.hideIframes = ((window.opera && hs.uaVersion < 9) || navigator.vendor == 'KDE'
                                                                                        || (hs.ieLt7 && hs.uaVersion < 5.5));
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 1 hr to fix
                                                                        assets/js/highslide-full.js on lines 972..973
                                                                        assets/js/highslide-with-gallery.js on lines 794..795

                                                                        Duplicated Code

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

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

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 3 locations. Consider refactoring.
                                                                        Open

                                                                                uaVersion: /Trident\/4\.0/.test(navigator.userAgent) ? 8 :
                                                                                    parseFloat((navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [0, '0'])[1]),
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 1 hr to fix
                                                                        assets/js/highslide-full.js on lines 215..216
                                                                        assets/js/highslide-with-gallery.js on lines 169..170

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 57.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                    this.fullExpandLabel = hs.createElement(
                                                                                        'a', {
                                                                                            href: 'javascript:hs.expanders[' + this.key + '].doFullExpand();',
                                                                                            title: hs.lang.fullExpandTitle,
                                                                                            className: 'highslide-full-expand'
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 1 hr to fix
                                                                        assets/js/highslide-full.js on lines 2932..2938
                                                                        assets/js/highslide-with-gallery.js on lines 2343..2349

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 56.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                previousOrNext: function (el, op) {
                                                                                    var exp = hs.getExpander(el);
                                                                                    if (exp) return hs.transit(exp.getAdjacentAnchor(op), exp);
                                                                                    else return false;
                                                                                },
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 1 hr to fix
                                                                        assets/js/highslide-full.js on lines 588..592
                                                                        assets/js/highslide-with-gallery.js on lines 445..449

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 55.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                    if (this.outline && !this.outlineWhileAnimating) {
                                                                                        if (up) this.outline.setPosition();
                                                                                        else this.outline.destroy();
                                                                                    }
                                                                        Severity: Minor
                                                                        Found in assets/js/highslide.js and 1 other location - About 55 mins to fix
                                                                        assets/js/highslide-with-gallery.js on lines 1565..1568

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 54.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                    var p = hs.page, mX = hs.mouse.x + p.scrollLeft, mY = hs.mouse.y + p.scrollTop;
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 55 mins to fix
                                                                        assets/js/highslide-full.js on lines 2324..2324
                                                                        assets/js/highslide-with-gallery.js on lines 1823..1823

                                                                        Duplicated Code

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

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

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

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

                                                                                registerOverlay: function (overlay) {
                                                                                    hs.push(hs.overlays, hs.extend(overlay, {hsId: 'hsId' + hs.idCounter++}));
                                                                                },
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 50 mins to fix
                                                                        assets/js/highslide-full.js on lines 654..656
                                                                        assets/js/highslide-with-gallery.js on lines 510..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 52.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                isHsAnchor: function (a) {
                                                                                    return (a.onclick && a.onclick.toString().replace(/\s/g, ' ').match(/hs.(htmlE|e)xpand/));
                                                                                },
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 45 mins to fix
                                                                        assets/js/highslide-full.js on lines 705..707
                                                                        assets/js/highslide-with-gallery.js on lines 561..563

                                                                        Duplicated Code

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

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

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

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

                                                                                    var exp = this,
                                                                                        l = this.x.get('loadingPos') + 'px',
                                                                                        t = this.y.get('loadingPos') + 'px';
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 40 mins to fix
                                                                        assets/js/highslide-full.js on lines 1485..1487
                                                                        assets/js/highslide-with-gallery.js on lines 1285..1287

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 49.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                            hs.addEventListener(document, 'mousemove', function (e) {
                                                                                hs.mouse = {x: e.clientX, y: e.clientY};
                                                                            });
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 40 mins to fix
                                                                        assets/js/highslide-full.js on lines 3396..3398
                                                                        assets/js/highslide-with-gallery.js on lines 2690..2692

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 49.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                        if (!this[type] && s) this[type] = hs.createElement('div',
                                                                                            {className: 'highslide-' + type, innerHTML: s});
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 40 mins to fix
                                                                        assets/js/highslide-full.js on lines 2469..2470
                                                                        assets/js/highslide-with-gallery.js on lines 1964..1965

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 49.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                        if (!this[type + 'Id'] && this.thumbsUserSetId)
                                                                                            this[type + 'Id'] = type + '-for-' + this.thumbsUserSetId;
                                                                        Severity: Major
                                                                        Found in assets/js/highslide.js and 2 other locations - About 40 mins to fix
                                                                        assets/js/highslide-full.js on lines 2443..2444
                                                                        assets/js/highslide-with-gallery.js on lines 1938..1939

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 49.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                    if (up) hs.setStyles(this.wrapper, {
                                                                                        width: x.t + 'px',
                                                                                        height: y.t + 'px'
                                                                                    });
                                                                        Severity: Minor
                                                                        Found in assets/js/highslide.js and 2 other locations - About 35 mins to fix
                                                                        assets/js/highslide-full.js on lines 2059..2062
                                                                        assets/js/highslide-with-gallery.js on lines 1589..1592

                                                                        Duplicated Code

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

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

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

                                                                        Tuning

                                                                        This issue has a mass of 47.

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

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

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

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

                                                                        Refactorings

                                                                        Further Reading

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

                                                                                discardElement: function (d) {
                                                                                    if (d) hs.garbageBin.appendChild(d);
                                                                                    hs.garbageBin.innerHTML = '';
                                                                                },
                                                                        Severity: Minor
                                                                        Found in assets/js/highslide.js and 2 other locations - About 30 mins to fix
                                                                        assets/js/highslide-full.js on lines 505..508
                                                                        assets/js/highslide-with-gallery.js on lines 363..366

                                                                        Duplicated Code

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

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

                                                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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