mambax7/extcal

View on GitHub
assets/js/highslide-full.js

Summary

Maintainability
F
6 mos
Test Coverage

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

/**
 * Name:    Highslide JS
 * Version: 4.1.13 (2011-10-06)
 * Config:  default +events +unobtrusive +imagemap +slideshow +positioning +transitions +viewport +thumbstrip +inline +ajax +iframe +flash
 * Author:  Torstein Hønsi
Severity: Major
Found in assets/js/highslide-full.js - About 1 wk 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-full.js - About 2 days to fix

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

          hs.Thumbstrip = function (slideshow) {
              function add(exp) {
                  hs.extend(options || {}, {
                      overlayId: dom,
                      hsId: 'thumbstrip',
      Severity: Minor
      Found in assets/js/highslide-full.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 contentLoaded has a Cognitive Complexity of 71 (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-full.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 getInline has a Cognitive Complexity of 67 (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 (type == 'caption' && !hs.fireEvent(this, 'onBeforeGetCaption')) return;
                      else if (type == 'heading' && !hs.fireEvent(this, 'onBeforeGetHeading')) return;
      Severity: Minor
      Found in assets/js/highslide-full.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 changeSize has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
      Open

              changeSize: function (up, to, dur) {
                  // transition
                  var trans = this.transitions,
                      other = up ? (this.last ? this.last.a : null) : hs.upcoming,
                      t = (trans[1] && other
      Severity: Minor
      Found in assets/js/highslide-full.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 justify has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
      Open

              justify: function (p, moveOnly) {
                  var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
      
                  if (tgt && tgt.match(/ /)) {
                      tgtArr = tgt.split(' ');
      Severity: Minor
      Found in assets/js/highslide-full.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 mouseClickHandler has a Cognitive Complexity of 58 (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-full.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 51 (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-full.js - About 7 hrs to fix

      Cognitive Complexity

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

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

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

      Further reading

      prototype has 53 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: Major
      Found in assets/js/highslide-full.js - About 7 hrs to fix

        Function keyHandler has a Cognitive Complexity of 47 (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
                    if (!hs.fireEvent(hs, 'onKeyDown', e)) return true;
        Severity: Minor
        Found in assets/js/highslide-full.js - About 7 hrs to fix

        Cognitive Complexity

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

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

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

        Further reading

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

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

          Function showHideElements has a Cognitive Complexity of 42 (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-full.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 loadHTML has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
          Open

                  loadHTML: function () {
                      var s = this.cachedGet || this.xhr.responseText,
                          regBody;
                      if (this.pre) hs.cachedGets[this.src] = s;
                      if (!hs.ie || hs.uaVersion >= 5.5) {
          Severity: Minor
          Found in assets/js/highslide-full.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 crossfade has 128 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  crossfade: function (up, to, from) {
                      if (!up) return;
                      var exp = this,
                          last = this.last,
                          x = this.x,
          Severity: Major
          Found in assets/js/highslide-full.js - About 5 hrs to fix

            Function dragHandler has a Cognitive Complexity of 33 (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;
                        if (exp.iframe) {
            Severity: Minor
            Found in assets/js/highslide-full.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 Thumbstrip has 122 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                hs.Thumbstrip = function (slideshow) {
                    function add(exp) {
                        hs.extend(options || {}, {
                            overlayId: dom,
                            hsId: 'thumbstrip',
            Severity: Major
            Found in assets/js/highslide-full.js - About 4 hrs to fix

              Function focus has a Cognitive Complexity of 31 (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-full.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 createOverlay has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
              Open

                      createOverlay: function (o) {
                          var el = o.overlayId,
                              relToVP = (o.relativeTo == 'viewport' && !/panel$/.test(o.position));
                          if (typeof el == 'string') el = hs.getNode(el);
                          if (o.html) el = hs.createElement('div', {innerHTML: o.html});
              Severity: Minor
              Found in assets/js/highslide-full.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 setSize has a Cognitive Complexity of 31 (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-full.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 positionOverlay has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
              Open

                      positionOverlay: function (overlay) {
                          var p = overlay.position || 'middle center',
                              relToVP = (overlay.relativeTo == 'viewport'),
                              offX = overlay.offsetX,
                              offY = overlay.offsetY;
              Severity: Minor
              Found in assets/js/highslide-full.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 getOverlays has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
              Open

                      getOverlays: function () {
                          this.getInline(['heading', 'caption'], true);
                          this.getNumber();
                          if (this.caption) hs.fireEvent(this, 'onAfterGetCaption');
                          if (this.heading) hs.fireEvent(this, 'onAfterGetHeading');
              Severity: Minor
              Found in assets/js/highslide-full.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 run has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
              Open

                      run: function () {
                          var xhr;
                          if (!this.src) this.src = hs.getSrc(this.a);
                          if (this.src.match('#')) {
                              var arr = this.src.split('#');
              Severity: Minor
              Found in assets/js/highslide-full.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 29 (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-full.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 htmlCreate has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
              Open

                      htmlCreate: function () {
                          if (!hs.fireEvent(this, 'onBeforeGetContent')) return;
              
                          this.content = hs.getCacheBinding(this.a);
                          if (!this.content)
              Severity: Minor
              Found in assets/js/highslide-full.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 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-full.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-full.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 crossfade has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

                      crossfade: function (up, to, from) {
                          if (!up) return;
                          var exp = this,
                              last = this.last,
                              x = this.x,
              Severity: Minor
              Found in assets/js/highslide-full.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 htmlSizeOperations has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
              Open

                      htmlSizeOperations: function () {
              
                          this.setObjContainerSize(this.innerContent);
              
              
              
              Severity: Minor
              Found in assets/js/highslide-full.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 writeExtendedContent has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
              Open

                      writeExtendedContent: function () {
                          if (this.hasExtendedContent) return;
                          var exp = this;
                          this.body = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body');
                          if (this.objectType == 'iframe') {
              Severity: Minor
              Found in assets/js/highslide-full.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 82 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-full.js - About 3 hrs to fix

                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-full.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 initSlideshow has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                Open

                        initSlideshow: function () {
                            if (!this.last) {
                                for (var i = 0; i < hs.slideshows.length; i++) {
                                    var ss = hs.slideshows[i], sg = ss.slideshowGroup;
                                    if (typeof sg == 'undefined' || sg === null || sg === this.slideshowGroup)
                Severity: Minor
                Found in assets/js/highslide-full.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 changeSize has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        changeSize: function (up, to, dur) {
                            // transition
                            var trans = this.transitions,
                                other = up ? (this.last ? this.last.a : null) : hs.upcoming,
                                t = (trans[1] && other
                Severity: Major
                Found in assets/js/highslide-full.js - About 2 hrs to fix

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

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

                          positionOverlay: function (overlay) {
                              var p = overlay.position || 'middle center',
                                  relToVP = (overlay.relativeTo == 'viewport'),
                                  offX = overlay.offsetX,
                                  offY = overlay.offsetY;
                  Severity: Major
                  Found in assets/js/highslide-full.js - About 2 hrs to fix

                    Function contentLoaded has 66 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: Major
                    Found in assets/js/highslide-full.js - About 2 hrs to fix

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

                              fade: function (up, to) {
                                  this.outlineWhileAnimating = false;
                                  var exp = this, t = up ? hs.expandDuration : 0;
                      
                                  if (up) {
                      Severity: Minor
                      Found in assets/js/highslide-full.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 htmlCreate has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              htmlCreate: function () {
                                  if (!hs.fireEvent(this, 'onBeforeGetContent')) return;
                      
                                  this.content = hs.getCacheBinding(this.a);
                                  if (!this.content)
                      Severity: Major
                      Found in assets/js/highslide-full.js - About 2 hrs to fix

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

                                        step: function (val, args) {
                                            var pos = args.pos,
                                                invPos = 1 - pos;
                                            var prop,
                                                size = {},
                        Severity: Major
                        Found in assets/js/highslide-full.js - About 2 hrs to fix

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

                                  afterExpand: function () {
                                      this.isExpanded = true;
                                      this.focus();
                          
                                      if (this.isHtml && this.objectLoadTime == 'after') this.writeExtendedContent();
                          Severity: Minor
                          Found in assets/js/highslide-full.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-full.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 59 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-full.js - About 2 hrs to fix

                            Function init has 58 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: Major
                            Found in assets/js/highslide-full.js - About 2 hrs to fix

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

                                      close: function () {
                                          if (this.isClosing || !this.isExpanded) return;
                                          if (this.transitions[1] == 'crossfade' && hs.upcoming) {
                                              hs.getExpander(hs.upcoming).cancelLoading();
                                              hs.upcoming = null;
                              Severity: Minor
                              Found in assets/js/highslide-full.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 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-full.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 expand has a Cognitive Complexity of 15 (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;
                                          if (type == 'html') {
                                              for (var i = 0; i < hs.sleeping.length; i++) {
                              Severity: Minor
                              Found in assets/js/highslide-full.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 getPosition has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                              Open

                                      getPosition: function (el) {
                                          if (/area/i.test(el.tagName)) {
                                              var imgs = document.getElementsByTagName('img');
                                              for (var i = 0; i < imgs.length; i++) {
                                                  var u = imgs[i].useMap;
                              Severity: Minor
                              Found in assets/js/highslide-full.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 destroyOverlays has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                              Open

                                      destroyOverlays: function () {
                                          if (!this.overlays.length) return;
                                          if (this.slideshow) {
                                              var c = this.slideshow.controls;
                                              if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c);
                              Severity: Minor
                              Found in assets/js/highslide-full.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 awake has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                              Open

                                      awake: function () {
                                          try {
                              
                                              hs.expanders[this.key] = this;
                              
                              
                              Severity: Minor
                              Found in assets/js/highslide-full.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 15 (exceeds 5 allowed). Consider refactoring.
                              Open

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

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

                                Function htmlSizeOperations has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        htmlSizeOperations: function () {
                                
                                            this.setObjContainerSize(this.innerContent);
                                
                                
                                
                                Severity: Minor
                                Found in assets/js/highslide-full.js - About 1 hr to fix

                                  Function keyHandler has 46 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
                                              if (!hs.fireEvent(hs, 'onKeyDown', e)) return true;
                                  Severity: Minor
                                  Found in assets/js/highslide-full.js - About 1 hr to fix

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

                                            run: function () {
                                                var xhr;
                                                if (!this.src) this.src = hs.getSrc(this.a);
                                                if (this.src.match('#')) {
                                                    var arr = this.src.split('#');
                                    Severity: Minor
                                    Found in assets/js/highslide-full.js - About 1 hr to fix

                                      Function htmlPrepareClose has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                              htmlPrepareClose: function () {
                                                  if (hs.geckoMac) { // bad redraws
                                                      if (!hs.mask) hs.mask = hs.createElement('div', null,
                                                          {position: 'absolute'}, hs.container);
                                                      hs.setStyles(hs.mask, {
                                      Severity: Minor
                                      Found in assets/js/highslide-full.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 dim has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                              dim: function (exp) {
                                                  if (!hs.dimmer) {
                                                      isNew = true;
                                                      hs.dimmer = hs.createElement('div', {
                                                          className: 'highslide-dimming highslide-viewport-size',
                                      Severity: Minor
                                      Found in assets/js/highslide-full.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: Critical
                                      Found in assets/js/highslide-full.js - About 1 hr to fix

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

                                                createOverlay: function (o) {
                                                    var el = o.overlayId,
                                                        relToVP = (o.relativeTo == 'viewport' && !/panel$/.test(o.position));
                                                    if (typeof el == 'string') el = hs.getNode(el);
                                                    if (o.html) el = hs.createElement('div', {innerHTML: o.html});
                                        Severity: Minor
                                        Found in assets/js/highslide-full.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-full.js - About 1 hr to fix

                                            Function showHideElements has 40 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-full.js - About 1 hr to fix

                                              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-full.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 getImageMapAreaCorrection has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                              Open

                                                      getImageMapAreaCorrection: function (area) {
                                                          var c = area.coords.split(',');
                                                          for (var i = 0; i < c.length; i++) c[i] = parseInt(c[i]);
                                              
                                                          if (area.shape.toLowerCase() == 'circle') {
                                              Severity: Minor
                                              Found in assets/js/highslide-full.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-full.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 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 'loadingPosXfade':
                                              Severity: Minor
                                              Found in assets/js/highslide-full.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 selectThumb has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                      function selectThumb(i, scrollBy) {
                                                          if (i === undefined) for (var j = 0; j < group.length; j++) {
                                                              if (group[j] == hs.expanders[slideshow.expKey].a) {
                                                                  i = j;
                                                                  break;
                                              Severity: Minor
                                              Found in assets/js/highslide-full.js - About 1 hr to fix

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

                                                        fade: function (up, to) {
                                                            this.outlineWhileAnimating = false;
                                                            var exp = this, t = up ? hs.expandDuration : 0;
                                                
                                                            if (up) {
                                                Severity: Minor
                                                Found in assets/js/highslide-full.js - About 1 hr to fix

                                                  Function getInline has 38 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 (type == 'caption' && !hs.fireEvent(this, 'onBeforeGetCaption')) return;
                                                                  else if (type == 'heading' && !hs.fireEvent(this, 'onBeforeGetHeading')) return;
                                                  Severity: Minor
                                                  Found in assets/js/highslide-full.js - About 1 hr to fix

                                                    Function dim has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                            dim: function (exp) {
                                                                if (!hs.dimmer) {
                                                                    isNew = true;
                                                                    hs.dimmer = hs.createElement('div', {
                                                                        className: 'highslide-dimming highslide-viewport-size',
                                                    Severity: Minor
                                                    Found in assets/js/highslide-full.js - About 1 hr to fix

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

                                                              loadHTML: function () {
                                                                  var s = this.cachedGet || this.xhr.responseText,
                                                                      regBody;
                                                                  if (this.pre) hs.cachedGets[this.src] = s;
                                                                  if (!hs.ie || hs.uaVersion >= 5.5) {
                                                      Severity: Minor
                                                      Found in assets/js/highslide-full.js - About 1 hr to fix

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

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

                                                                afterClose: function () {
                                                                    this.a.className = this.a.className.replace('highslide-active-anchor', '');
                                                        
                                                                    this.doShowHide('visible');
                                                        
                                                        
                                                        Severity: Minor
                                                        Found in assets/js/highslide-full.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 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-full.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-full.js - About 1 hr to fix

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

                                                                  dragHandler: function (e) {
                                                                      if (!hs.dragArgs) return true;
                                                                      if (!e) e = window.event;
                                                                      var a = hs.dragArgs, exp = a.exp;
                                                                      if (exp.iframe) {
                                                          Severity: Minor
                                                          Found in assets/js/highslide-full.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-full.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-full.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 transit has a Cognitive Complexity of 11 (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-full.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 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-full.js - About 1 hr to fix

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

                                                                      close: function () {
                                                                          if (this.isClosing || !this.isExpanded) return;
                                                                          if (this.transitions[1] == 'crossfade' && hs.upcoming) {
                                                                              hs.getExpander(hs.upcoming).cancelLoading();
                                                                              hs.upcoming = null;
                                                              Severity: Minor
                                                              Found in assets/js/highslide-full.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-full.js - About 1 hr to fix

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

                                                                          writeExtendedContent: function () {
                                                                              if (this.hasExtendedContent) return;
                                                                              var exp = this;
                                                                              this.body = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body');
                                                                              if (this.objectType == 'iframe') {
                                                                  Severity: Minor
                                                                  Found in assets/js/highslide-full.js - About 1 hr to fix

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

                                                                            initSlideshow: function () {
                                                                                if (!this.last) {
                                                                                    for (var i = 0; i < hs.slideshows.length; i++) {
                                                                                        var ss = hs.slideshows[i], sg = ss.slideshowGroup;
                                                                                        if (typeof sg == 'undefined' || sg === null || sg === this.slideshowGroup)
                                                                    Severity: Minor
                                                                    Found in assets/js/highslide-full.js - About 1 hr to fix

                                                                      Function setSize has 28 lines of code (exceeds 25 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-full.js - About 1 hr to fix

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

                                                                                addSlideshow: function (options) {
                                                                                    var sg = options.slideshowGroup;
                                                                                    if (typeof sg == 'object') {
                                                                                        for (var i = 0; i < sg.length; i++) {
                                                                                            var o = {};
                                                                        Severity: Minor
                                                                        Found in assets/js/highslide-full.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 doFullExpand has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                                                        Open

                                                                                doFullExpand: function () {
                                                                                    try {
                                                                                        if (!hs.fireEvent(this, 'onDoFullExpand')) return;
                                                                                        if (this.fullExpandLabel) hs.discardElement(this.fullExpandLabel);
                                                                        
                                                                        
                                                                        Severity: Minor
                                                                        Found in assets/js/highslide-full.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-full.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 undim has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                                                        Open

                                                                                undim: function (key) {
                                                                                    if (!hs.dimmer) return;
                                                                                    if (typeof key != 'undefined') hs.dimmer.owner = hs.dimmer.owner.replace('|' + key, '');
                                                                        
                                                                                    if (
                                                                        Severity: Minor
                                                                        Found in assets/js/highslide-full.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 showLoading has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                                                        Open

                                                                                showLoading: function () {
                                                                                    if (this.onLoadStarted || this.loading) return;
                                                                        
                                                                                    this.loading = hs.loading;
                                                                                    var exp = this;
                                                                        Severity: Minor
                                                                        Found in assets/js/highslide-full.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 focus has 26 lines of code (exceeds 25 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-full.js - About 1 hr to fix

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

                                                                                  replaceLang: function (s) {
                                                                                      s = s.replace(/\s/g, ' ');
                                                                                      var re = /{hs\.lang\.([^}]+)\}/g,
                                                                                          matches = s.match(re),
                                                                                          lang;
                                                                          Severity: Minor
                                                                          Found in assets/js/highslide-full.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-full.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 resize has a Cognitive Complexity of 9 (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 = this.isHtml ? e.height + e.dY : w / r;
                                                                          Severity: Minor
                                                                          Found in assets/js/highslide-full.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 getAdjacentAnchor has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                                          Open

                                                                                  getAdjacentAnchor: function (op) {
                                                                                      var current = this.getAnchorIndex(), as = hs.anchors.groups[this.slideshowGroup || 'none'];
                                                                                      if (as && !as[current + op] && this.slideshow && this.slideshow.repeat) {
                                                                                          if (op == 1) return as[0];
                                                                                          else if (op == -1) return as[as.length - 1];
                                                                          Severity: Minor
                                                                          Found in assets/js/highslide-full.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-full.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 imageCreate has a Cognitive Complexity of 9 (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-full.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-full.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 checkFirstAndLast has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                                                          Open

                                                                                  checkFirstAndLast: function () {
                                                                                      if (this.repeat || !this.controls) return;
                                                                                      var exp = hs.expanders[this.expKey],
                                                                                          cur = exp.getAnchorIndex(),
                                                                                          re = /disabled$/;
                                                                          Severity: Minor
                                                                          Found in assets/js/highslide-full.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 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-full.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 (exp.slideshow) exp.slideshow.hitSpace();
                                                                          Severity: Major
                                                                          Found in assets/js/highslide-full.js - About 45 mins to fix

                                                                            Avoid deeply nested control flow statements.
                                                                            Open

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

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

                                                                                      correctIframeSize: function () {
                                                                                          var wDiff = this.innerContent.offsetWidth - this.ruler.offsetWidth;
                                                                                          hs.discardElement(this.ruler);
                                                                                          if (wDiff < 0) wDiff = 0;
                                                                              
                                                                              
                                                                              Severity: Minor
                                                                              Found in assets/js/highslide-full.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 (exp.slideshow) exp.slideshow.pause();
                                                                              Severity: Major
                                                                              Found in assets/js/highslide-full.js - About 45 mins to fix

                                                                                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-full.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-full.js - About 45 mins to fix

                                                                                    Avoid deeply nested control flow statements.
                                                                                    Open

                                                                                                        if (hs.dragArgs.exp.releaseMask)
                                                                                                            hs.dragArgs.exp.releaseMask.style.display = 'none';
                                                                                    Severity: Major
                                                                                    Found in assets/js/highslide-full.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-full.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 (ie6) {
                                                                                                                  o.style.width = (overlayBox.offsetWidth + 2 * x.cb
                                                                                                                      + x.p1 + x.p2) + 'px';
                                                                                                              }
                                                                                      Severity: Major
                                                                                      Found in assets/js/highslide-full.js - About 45 mins to fix

                                                                                        Avoid deeply nested control flow statements.
                                                                                        Open

                                                                                                                for (var dim in hs.oPos) for (var i = 0; i < 5; i++) {
                                                                                                                    p = this[dim];
                                                                                                                    if (pos.match(hs.oPos[dim][i])) {
                                                                                                                        p.pos = this.last[dim].pos
                                                                                                                            + (this.last[dim].p1 - p.p1)
                                                                                        Severity: Major
                                                                                        Found in assets/js/highslide-full.js - About 45 mins to fix

                                                                                          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;
                                                                                                                  if (!this.dimmingOpacity) { // hide all if dimming
                                                                                          Severity: Major
                                                                                          Found in assets/js/highslide-full.js - About 45 mins to fix

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

                                                                                                                    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-full.js - About 45 mins to fix

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

                                                                                                  hs.Slideshow = function (expKey, options) {
                                                                                                      if (hs.dynamicallyUpdateAnchors !== false) hs.updateAnchors();
                                                                                                      this.expKey = expKey;
                                                                                                      for (var x in options) this[x] = options[x];
                                                                                                      if (this.useControls) this.getControls();
                                                                                              Severity: Minor
                                                                                              Found in assets/js/highslide-full.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 (hasDragged) hs.fireEvent(hs.dragArgs.exp, 'onDrop', hs.dragArgs);
                                                                                              Severity: Major
                                                                                              Found in assets/js/highslide-full.js - About 45 mins to fix

                                                                                                Avoid deeply nested control flow statements.
                                                                                                Open

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

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

                                                                                                          reflow: function () {
                                                                                                              if (this.scrollerDiv) {
                                                                                                                  var h = /iframe/i.test(this.scrollerDiv.tagName) ? (this.getIframePageHeight() + 1) + 'px' : 'auto';
                                                                                                                  if (this.body) this.body.style.height = h;
                                                                                                                  this.scrollerDiv.style.height = h;
                                                                                                  Severity: Minor
                                                                                                  Found in assets/js/highslide-full.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

                                                                                                                          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-full.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-full.js - About 45 mins to fix

                                                                                                      Avoid deeply nested control flow statements.
                                                                                                      Open

                                                                                                                          if (!moveOnly && hasMovedMin && allowReduce) {
                                                                                                                              p.size = Math.min(p.size, p.get(dim == 'y' ? 'fitsize' : 'maxsize'));
                                                                                                                          } else if (p.get('wsize') < p.get('fitsize')) {
                                                                                                                              p.pos = p.scroll + p.clientSize - p.marginMax - p.get('wsize');
                                                                                                                          } else { // image larger than viewport
                                                                                                      Severity: Major
                                                                                                      Found in assets/js/highslide-full.js - About 45 mins to fix

                                                                                                        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-full.js - About 45 mins to fix

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

                                                                                                                  reuseOverlay: function (o, el) {
                                                                                                                      if (!this.last) return false;
                                                                                                                      for (var i = 0; i < this.last.overlays.length; i++) {
                                                                                                                          var oDiv = hs.$('hsId' + this.last.overlays[i]);
                                                                                                                          if (oDiv && oDiv.hsId == o.hsId) {
                                                                                                          Severity: Minor
                                                                                                          Found in assets/js/highslide-full.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 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-full.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 setObjContainerSize has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                                                                          Open

                                                                                                                  setObjContainerSize: function (parent, auto) {
                                                                                                                      var c = hs.getElementByClass(parent, 'DIV', 'highslide-body');
                                                                                                                      if (/(iframe|swf)/.test(this.objectType)) {
                                                                                                                          if (this.objectWidth) c.style.width = this.objectWidth + 'px';
                                                                                                                          if (this.objectHeight) c.style.height = this.objectHeight + 'px';
                                                                                                          Severity: Minor
                                                                                                          Found in assets/js/highslide-full.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

                                                                                                          Consider simplifying this complex logical expression.
                                                                                                          Open

                                                                                                                          if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId)
                                                                                                                              || (sg && sg === this.slideshowGroup)) {
                                                                                                                              if (this.isImage || (this.isHtml && o.useOnHtml))
                                                                                                                                  this.createOverlay(o);
                                                                                                                          }
                                                                                                          Severity: Major
                                                                                                          Found in assets/js/highslide-full.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-full.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-full.js - About 35 mins to fix

                                                                                                                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-full.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 destroyObject has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                                                                Open

                                                                                                                        destroyObject: function () {
                                                                                                                            if (hs.ie && this.iframe)
                                                                                                                                try {
                                                                                                                                    this.iframe.contentWindow.document.body.innerHTML = '';
                                                                                                                                } catch (e) {
                                                                                                                Severity: Minor
                                                                                                                Found in assets/js/highslide-full.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-full.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 htmlGetSize has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                                                                Open

                                                                                                                        htmlGetSize: function () {
                                                                                                                            if (this.iframe && !this.objectHeight) { // loadtime before
                                                                                                                                this.iframe.style.height = this.body.style.height = this.getIframePageHeight() + 'px';
                                                                                                                            }
                                                                                                                            this.innerContent.appendChild(hs.clearing);
                                                                                                                Severity: Minor
                                                                                                                Found in assets/js/highslide-full.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 true;
                                                                                                                Severity: Major
                                                                                                                Found in assets/js/highslide-full.js - About 30 mins to fix

                                                                                                                  Avoid too many return statements within this function.
                                                                                                                  Open

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

                                                                                                                    Avoid too many return statements within this function.
                                                                                                                    Open

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

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

                                                                                                                          hs.Thumbstrip = function (slideshow) {
                                                                                                                              function add(exp) {
                                                                                                                                  hs.extend(options || {}, {
                                                                                                                                      overlayId: dom,
                                                                                                                                      hsId: 'thumbstrip',
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 1 wk to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 2496..2629

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 1581.

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

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

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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(wrapper, {
                                                                                                                                      width: x.size
                                                                                                                                  }, {
                                                                                                                                      duration: hs.transitionDuration,
                                                                                                                                      step: function (val, args) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 1 wk to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1721..1800

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 1461.

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

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

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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.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-full.js and 2 other locations - About 1 wk to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 969..1060
                                                                                                                      assets/js/highslide.js on lines 796..887

                                                                                                                      Duplicated Code

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

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

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

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

                                                                                                                          hs.Slideshow.prototype = {
                                                                                                                              getControls: function () {
                                                                                                                                  this.controls = hs.createElement('div', {innerHTML: hs.replaceLang(hs.skin.controls)},
                                                                                                                                      null, hs.container);
                                                                                                                      
                                                                                                                      
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 6 days to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 2408..2495

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 1068.

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

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

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

                                                                                                                              positionOverlay: function (overlay) {
                                                                                                                                  var p = overlay.position || 'middle center',
                                                                                                                                      relToVP = (overlay.relativeTo == 'viewport'),
                                                                                                                                      offX = overlay.offsetX,
                                                                                                                                      offY = overlay.offsetY;
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 6 days to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 2156..2229

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 1004.

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

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

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

                                                                                                                              justify: function (p, moveOnly) {
                                                                                                                                  var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
                                                                                                                      
                                                                                                                                  if (tgt && tgt.match(/ /)) {
                                                                                                                                      tgtArr = tgt.split(' ');
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 5 days to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1403..1462

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 924.

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

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

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

                                                                                                                              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: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 5 days to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1983..2027

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 851.

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

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

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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-full.js and 2 other locations - About 4 days to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 844..910
                                                                                                                      assets/js/highslide.js on lines 671..737

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 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-full.js and 2 other locations - About 3 days to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1464..1512
                                                                                                                      assets/js/highslide.js on lines 1228..1276

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                              calcExpanded: function () {
                                                                                                                                  var exp = this.exp;
                                                                                                                                  this.justify = 'auto';
                                                                                                                      
                                                                                                                                  // get alignment
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 3 days to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1111..1139

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 527.

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

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

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

                                                                                                                              fade: function (up, to) {
                                                                                                                                  this.outlineWhileAnimating = false;
                                                                                                                                  var exp = this, t = up ? hs.expandDuration : 0;
                                                                                                                      
                                                                                                                                  if (up) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 2 days to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1622..1668

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 485.

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

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

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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-full.js and 2 other locations - About 2 days to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 2269..2301
                                                                                                                      assets/js/highslide.js on lines 1752..1784

                                                                                                                      Duplicated Code

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

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

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

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

                                                                                                                                          if (ss && this.last && ss.controls && ss.fixedControls) {
                                                                                                                                              var pos = ss.overlayOptions.position || '', p;
                                                                                                                                              for (var dim in hs.oPos) for (var i = 0; i < 5; i++) {
                                                                                                                                                  p = this[dim];
                                                                                                                                                  if (pos.match(hs.oPos[dim][i])) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 2 days to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1375..1390

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 394.

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

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

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

                                                                                                                              initSlideshow: function () {
                                                                                                                                  if (!this.last) {
                                                                                                                                      for (var i = 0; i < hs.slideshows.length; i++) {
                                                                                                                                          var ss = hs.slideshows[i], sg = ss.slideshowGroup;
                                                                                                                                          if (typeof sg == 'undefined' || sg === null || sg === this.slideshowGroup)
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 2 days to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1879..1909

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 376.

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

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

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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-full.js and 2 other locations - About 2 days to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 931..967
                                                                                                                      assets/js/highslide.js on lines 758..794

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                          hs.addEventListener(document, 'ready', function () {
                                                                                                                              if (hs.expandCursor || hs.dimmingOpacity) {
                                                                                                                                  var style = hs.createElement('style', {type: 'text/css'}, null,
                                                                                                                                      document.getElementsByTagName('HEAD')[0]),
                                                                                                                                      backCompat = document.compatMode == 'BackCompat';
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 2 days to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 2648..2680

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 367.

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

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

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

                                                                                                                              get: function (key) {
                                                                                                                                  switch (key) {
                                                                                                                                      case 'loadingPos':
                                                                                                                                          return this.tpos + this.tb + (this.t - hs.loading['offset' + this.ucwh]) / 2;
                                                                                                                                      case 'loadingPosXfade':
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 2 days to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1074..1094

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 365.

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

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

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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-full.js and 2 other locations - About 1 day to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 2303..2322
                                                                                                                      assets/js/highslide.js on lines 1786..1805

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 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-full.js and 2 other locations - About 1 day to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1301..1326
                                                                                                                      assets/js/highslide.js on lines 1105..1130

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      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-full.js and 2 other locations - About 1 day to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 207..231
                                                                                                                      assets/js/highslide.js on lines 142..166

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 259.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                              getWrapperKey: function (element, expOnly) {
                                                                                                                                  var el, re = /^highslide-wrapper-([0-9]+)$/;
                                                                                                                                  // 1. look in open expanders
                                                                                                                                  el = element;
                                                                                                                                  while (el.parentNode) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 529..552

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 247.

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

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

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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-full.js and 2 other locations - About 1 day to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1101..1110
                                                                                                                      assets/js/highslide.js on lines 926..935

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 1 day to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 715..733
                                                                                                                      assets/js/highslide.js on lines 551..569

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 1 day to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1948..1961
                                                                                                                      assets/js/highslide.js on lines 1454..1467

                                                                                                                      Duplicated Code

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

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

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

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

                                                                                                                              undim: function (key) {
                                                                                                                                  if (!hs.dimmer) return;
                                                                                                                                  if (typeof key != 'undefined') hs.dimmer.owner = hs.dimmer.owner.replace('|' + key, '');
                                                                                                                      
                                                                                                                                  if (
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 411..424

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 1 day to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 252..267
                                                                                                                      assets/js/highslide.js on lines 187..202

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                  if (op !== null) {
                                                                                                                                      if (op != 2)hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
                                                                                                                                      if (!hs.enableKeyListener) return true;
                                                                                                                      
                                                                                                                                      if (e.preventDefault) e.preventDefault();
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 1 day to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 488..505

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 196.

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

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

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

                                                                                                                              transit: function (adj, exp) {
                                                                                                                                  var last = exp || hs.getExpander();
                                                                                                                                  exp = last;
                                                                                                                                  if (hs.upcoming) return false;
                                                                                                                                  else hs.last = last;
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 7 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 425..443

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 190.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Identical blocks of code found in 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-full.js and 2 other locations - About 7 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1062..1072
                                                                                                                      assets/js/highslide.js on lines 889..899

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 7 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 232..250
                                                                                                                      assets/js/highslide.js on lines 167..185

                                                                                                                      Duplicated Code

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

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

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

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

                                                                                                                              if (!this.outlineType
                                                                                                                                  || (this.last && this.isImage && this.transitions[1] == 'crossfade')) {
                                                                                                                                  this[this.contentType + 'Create']();
                                                                                                                      
                                                                                                                              } else if (hs.pendingOutlines[this.outlineType]) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 7 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1243..1260

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 183.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Identical blocks of code found in 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-full.js and 2 other locations - About 7 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 912..929
                                                                                                                      assets/js/highslide.js on lines 739..756

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                              reuseOverlay: function (o, el) {
                                                                                                                                  if (!this.last) return false;
                                                                                                                                  for (var i = 0; i < this.last.overlays.length; i++) {
                                                                                                                                      var oDiv = hs.$('hsId' + this.last.overlays[i]);
                                                                                                                                      if (oDiv && oDiv.hsId == o.hsId) {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 6 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1802..1814

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 173.

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

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

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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-full.js and 2 other locations - About 6 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 315..333
                                                                                                                      assets/js/highslide.js on lines 230..248

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 6 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 2252..2268
                                                                                                                      assets/js/highslide.js on lines 1735..1751

                                                                                                                      Duplicated Code

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

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

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

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

                                                                                                                      Duplicated Code

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

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

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

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

                                                                                                                              getAdjacentAnchor: function (op) {
                                                                                                                                  var current = this.getAnchorIndex(), as = hs.anchors.groups[this.slideshowGroup || 'none'];
                                                                                                                                  if (as && !as[current + op] && this.slideshow && this.slideshow.repeat) {
                                                                                                                                      if (op == 1) return as[0];
                                                                                                                                      else if (op == -1) return as[as.length - 1];
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 5 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1851..1858

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 151.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                              getNumber: function () {
                                                                                                                                  if (this[this.numberPosition]) {
                                                                                                                                      var arr = hs.anchors.groups[this.slideshowGroup || 'none'];
                                                                                                                                      if (arr) {
                                                                                                                                          var s = hs.lang.number.replace('%1', this.getAnchorIndex() + 1).replace('%2', arr.length);
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 5 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1869..1878

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 150.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                              replaceLang: function (s) {
                                                                                                                                  s = s.replace(/\s/g, ' ');
                                                                                                                                  var re = /{hs\.lang\.([^}]+)\}/g,
                                                                                                                                      matches = s.match(re),
                                                                                                                                      lang;
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 5 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 302..312

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 150.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                              addSlideshow: function (options) {
                                                                                                                                  var sg = options.slideshowGroup;
                                                                                                                                  if (typeof sg == 'object') {
                                                                                                                                      for (var i = 0; i < sg.length; i++) {
                                                                                                                                          var o = {};
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 5 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 515..527

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 146.

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

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

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

                                                                                                                          hs.addEventListener(window, 'resize', function () {
                                                                                                                              hs.getPageSize();
                                                                                                                              if (hs.viewport) for (var i = 0; i < hs.viewport.childNodes.length; i++) {
                                                                                                                                  var node = hs.viewport.childNodes[i],
                                                                                                                                      exp = hs.getExpander(node);
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 5 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 2681..2689

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 144.

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

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

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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-full.js and 2 other locations - About 5 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 677..691
                                                                                                                      assets/js/highslide.js on lines 513..527

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                  switch (e.keyCode) {
                                                                                                                                      case 70: // f
                                                                                                                                          if (exp) exp.doFullExpand();
                                                                                                                                          return true;
                                                                                                                                      case 32: // Space
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 5 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 466..487

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 4 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 350..361
                                                                                                                      assets/js/highslide.js on lines 265..276

                                                                                                                      Duplicated Code

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

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

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

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

                                                                                                                              writeCredits: function () {
                                                                                                                                  if (this.credits) return;
                                                                                                                                  this.credits = hs.createElement('a', {
                                                                                                                                      href: hs.creditsHref,
                                                                                                                                      target: hs.creditsTarget,
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 4 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1919..1933

                                                                                                                      Duplicated Code

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

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

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

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

                                                                                                                              lang: {
                                                                                                                                  cssDirection: 'ltr',
                                                                                                                                  loadingText: 'Loading...',
                                                                                                                                  loadingTitle: 'Click to cancel',
                                                                                                                                  focusTitle: 'Click to bring to front',
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 4 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 12..36

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      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-full.js and 2 other locations - About 4 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 198..206
                                                                                                                      assets/js/highslide.js on lines 133..141

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 4 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 705..714
                                                                                                                      assets/js/highslide.js on lines 541..550

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                          hs.Slideshow = function (expKey, options) {
                                                                                                                              if (hs.dynamicallyUpdateAnchors !== false) hs.updateAnchors();
                                                                                                                              this.expKey = expKey;
                                                                                                                              for (var x in options) this[x] = options[x];
                                                                                                                              if (this.useControls) this.getControls();
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 4 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 2401..2407

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 121.

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

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

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

                                                                                                                                  controls: '<div class="highslide-controls"><ul>' +
                                                                                                                                  '<li class="highslide-previous">' +
                                                                                                                                  '<a href="#" title="{hs.lang.previousTitle}">' +
                                                                                                                                  '<span>{hs.lang.previousText}</span></a>' +
                                                                                                                                  '</li>' +
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 4 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 76..105

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 121.

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

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

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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.expanders.length; i++) {
                                                                                                                                  if (hs.expanders[i] && hs.expanders[i].a == a
                                                                                                                                      && !(this.last && this.transitions[1] == 'crossfade')) {
                                                                                                                                      hs.expanders[i].focus();
                                                                                                                                      return false;
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 4 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1199..1205

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 117.

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

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

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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-full.js and 2 other locations - About 4 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 554..559
                                                                                                                      assets/js/highslide.js on lines 390..395

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 4 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1214..1218
                                                                                                                      assets/js/highslide.js on lines 1026..1030

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 3 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1208..1212
                                                                                                                      assets/js/highslide.js on lines 1020..1024

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 3 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1142..1147
                                                                                                                      assets/js/highslide.js on lines 961..966

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 3 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 184..191
                                                                                                                      assets/js/highslide.js on lines 119..126

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 3 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 743..747
                                                                                                                      assets/js/highslide.js on lines 579..583

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 3 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 335..342
                                                                                                                      assets/js/highslide.js on lines 250..257

                                                                                                                      Duplicated Code

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

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

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

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

                                                                                                                                  for (var i = 0; i < this.overlays.length; i++) {
                                                                                                                                      var o = hs.$('hsId' + this.overlays[i]);
                                                                                                                                      if (o && o.parentNode == hs.viewport && hs.getExpander(o) == this) hs.discardElement(o);
                                                                                                                                  }
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 3 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 2330..2333

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 105.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                                      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-full.js and 2 other locations - About 3 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1967..1972
                                                                                                                      assets/js/highslide.js on lines 1472..1477

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 3 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1824..1825
                                                                                                                      assets/js/highslide.js on lines 1380..1381

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 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-full.js and 2 other locations - About 3 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1270..1275
                                                                                                                      assets/js/highslide.js on lines 1081..1086

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                      if (/(Android|iPad|iPhone|iPod)/.test(navigator.userAgent)) {
                                                                                                                                          var body = document.body;
                                                                                                                      
                                                                                                                                          function pixDimmerSize() {
                                                                                                                                              hs.setStyles(hs.dimmer, {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 3 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 382..394

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 100.

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

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

                                                                                                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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-full.js and 2 other locations - About 3 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 2244..2248
                                                                                                                      assets/js/highslide.js on lines 1727..1731

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 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

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

                                                                                                                                  var trans = this.transitions,
                                                                                                                                      other = up ? (this.last ? this.last.a : null) : hs.upcoming,
                                                                                                                                      t = (trans[1] && other
                                                                                                                                      && hs.getParam(other, 'transitions')[1] == trans[1]) ?
                                                                                                                                          trans[1] : trans[0];
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 3 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1554..1558

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                  var overlay = hs.createElement(
                                                                                                                                      'div', {
                                                                                                                                          id: 'hsId' + hs.idCounter++,
                                                                                                                                          hsId: o.hsId
                                                                                                                                      }, {
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 3 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 2123..2136

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 96.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                                  if (isNew) {
                                                                                                                                      if (hs.geckoMac && hs.dimmingGeckoFix)
                                                                                                                                          hs.setStyles(hs.dimmer, {
                                                                                                                                              background: 'url(' + hs.graphicsDir + 'geckodimmer.png)',
                                                                                                                                              opacity: 1
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 2 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 401..409

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 94.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      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-full.js and 2 other locations - About 2 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1860..1866
                                                                                                                      assets/js/highslide.js on lines 1412..1418

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 93.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                              getElementByClass: function (el, tagName, className) {
                                                                                                                                  var els = el.getElementsByTagName(tagName);
                                                                                                                                  for (var i = 0; i < els.length; i++) {
                                                                                                                                      if ((new RegExp(className)).test(els[i].className)) {
                                                                                                                                          return els[i];
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 2 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 293..301

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 92.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

                                                                                                                      Identical blocks of code found in 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-full.js and 2 other locations - About 2 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 762..773
                                                                                                                      assets/js/highslide.js on lines 598..609

                                                                                                                      Duplicated Code

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

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

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

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

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                              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-full.js and 2 other locations - About 2 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1186..1190
                                                                                                                      assets/js/highslide.js on lines 999..1003

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 87.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                                  for (var n in names) {
                                                                                                                                      this[n] = names[n].content.cloneNode(1);
                                                                                                                                      hs.setStyles(this[n], {
                                                                                                                                          position: 'absolute',
                                                                                                                                          border: 0,
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 2 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1700..1708

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 2 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 2633..2643
                                                                                                                      assets/js/highslide.js on lines 1870..1880

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 2 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 693..703
                                                                                                                      assets/js/highslide.js on lines 529..539

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 2 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1158..1164
                                                                                                                      assets/js/highslide.js on lines 973..979

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 2 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1391..1394
                                                                                                                      assets/js/highslide.js on lines 1175..1178

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 2 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1844..1848
                                                                                                                      assets/js/highslide.js on lines 1400..1404

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 2 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1831..1841
                                                                                                                      assets/js/highslide.js on lines 1387..1397

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 81.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                                  var exp = this,
                                                                                                                                      last = this.last,
                                                                                                                                      x = this.x,
                                                                                                                                      y = this.y,
                                                                                                                                      lastX = last.x,
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 2 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1671..1679

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                                  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-full.js and 2 other locations - About 2 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 2140..2145
                                                                                                                      assets/js/highslide.js on lines 1634..1639

                                                                                                                      Duplicated Code

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

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

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

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

                                                                                                                                  if (tgt) {
                                                                                                                                      l = tgt.x.get('loadingPosXfade') + 'px';
                                                                                                                                      t = tgt.y.get('loadingPosXfade') + 'px';
                                                                                                                                      this.loading.style.zIndex = hs.zIndexCounter++;
                                                                                                                                  }
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 2 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1290..1294

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      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-full.js and 2 other locations - About 2 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1095..1100
                                                                                                                      assets/js/highslide.js on lines 920..925

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 2 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 2071..2075
                                                                                                                      assets/js/highslide.js on lines 1575..1579

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 2 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 565..568
                                                                                                                      assets/js/highslide.js on lines 401..404

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 2 hrs to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 837..843
                                                                                                                      assets/js/highslide.js on lines 664..670

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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.cb + x.tb) + 'px',
                                                                                                                                          top: (y.tpos - y.cb + y.tb) + 'px'
                                                                                                                                      });
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 3 other locations - About 2 hrs to fix
                                                                                                                      assets/js/highslide-full.js on lines 1631..1634
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1354..1357
                                                                                                                      assets/js/highslide.js on lines 1158..1161

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      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-full.js and 3 other locations - About 2 hrs to fix
                                                                                                                      assets/js/highslide-full.js on lines 2064..2067
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1354..1357
                                                                                                                      assets/js/highslide.js on lines 1158..1161

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 1 hr to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1228..1236
                                                                                                                      assets/js/highslide.js on lines 1040..1048

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 74.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                                  if (this.dim == 'x' && exp.slideshow && exp.isImage) {
                                                                                                                                      if (i == this.full) exp.slideshow.disable('full-expand');
                                                                                                                                      else exp.slideshow.enable('full-expand');
                                                                                                                                  }
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1153..1156

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 1 hr to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1978..1982
                                                                                                                      assets/js/highslide.js on lines 1483..1487

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 1 hr to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 798..802
                                                                                                                      assets/js/highslide.js on lines 625..629

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 1 hr to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1941..1944
                                                                                                                      assets/js/highslide.js on lines 1447..1450

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 1 hr to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 749..761
                                                                                                                      assets/js/highslide.js on lines 585..597

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 1 hr to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 2149..2153
                                                                                                                      assets/js/highslide.js on lines 1643..1647

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 1 hr to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1265..1268
                                                                                                                      assets/js/highslide.js on lines 1076..1079

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 1 hr to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1168..1173
                                                                                                                      assets/js/highslide.js on lines 983..988

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 1 hr to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1593..1596
                                                                                                                      assets/js/highslide.js on lines 1345..1348

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 (this.slideshow) {
                                                                                                                                      var c = this.slideshow.controls;
                                                                                                                                      if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c);
                                                                                                                                  }
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 2326..2329

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 (this.transitions[1] == 'crossfade' && hs.upcoming) {
                                                                                                                                      hs.getExpander(hs.upcoming).cancelLoading();
                                                                                                                                      hs.upcoming = null;
                                                                                                                                  }
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 2079..2082

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 60.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                                      hs.viewport = hs.createElement('div', {
                                                                                                                                              className: 'highslide-viewport highslide-viewport-size'
                                                                                                                                          }, {
                                                                                                                                              visibility: (hs.safari && hs.uaVersion < 525) ? 'visible' : 'hidden'
                                                                                                                                          }, hs.container, 1
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 775..780

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 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-full.js and 2 other locations - About 1 hr to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1295..1298
                                                                                                                      assets/js/highslide.js on lines 1099..1102

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 1 hr to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 794..795
                                                                                                                      assets/js/highslide.js on lines 621..622

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 1 hr to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 169..170
                                                                                                                      assets/js/highslide.js on lines 104..105

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 1 hr to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 2343..2349
                                                                                                                      assets/js/highslide.js on lines 1814..1820

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 56.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                                  hs.setStyles(content, {
                                                                                                                                      width: (x.imgSize || x.size) + 'px',
                                                                                                                                      height: (y.imgSize || y.size) + 'px'
                                                                                                                                  });
                                                                                                                      Severity: Major
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 1 hr to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1682..1685

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 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-full.js and 2 other locations - About 1 hr to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 445..449
                                                                                                                      assets/js/highslide.js on lines 301..305

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 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-full.js and 2 other locations - About 55 mins to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1823..1823
                                                                                                                      assets/js/highslide.js on lines 1379..1379

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 50 mins to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 510..512
                                                                                                                      assets/js/highslide.js on lines 361..363

                                                                                                                      Duplicated Code

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

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

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

                                                                                                                      Tuning

                                                                                                                      This issue has a mass of 52.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                                  var fadeBox = hs.createElement('div', {
                                                                                                                                          className: 'highslide-' + this.contentType
                                                                                                                                      }, {
                                                                                                                                          position: 'absolute',
                                                                                                                                          zIndex: 4,
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 50 mins to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1690..1698

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 45 mins to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 561..563
                                                                                                                      assets/js/highslide.js on lines 397..399

                                                                                                                      Duplicated Code

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

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

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

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

                                                                                                                      Duplicated Code

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

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

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

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

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 40 mins to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 2690..2692
                                                                                                                      assets/js/highslide.js on lines 1913..1915

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 40 mins to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1938..1939
                                                                                                                      assets/js/highslide.js on lines 1444..1445

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 35 mins to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 1589..1592
                                                                                                                      assets/js/highslide.js on lines 1341..1344

                                                                                                                      Duplicated Code

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

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

                                                                                                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-full.js and 2 other locations - About 30 mins to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 363..366
                                                                                                                      assets/js/highslide.js on lines 278..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 45.

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

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

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

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

                                                                                                                      Refactorings

                                                                                                                      Further Reading

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

                                                                                                                                      Math.easeOutQuad = function (t, b, c, d) {
                                                                                                                                          return -c * (t /= d) * (t - 2) + b;
                                                                                                                                      };
                                                                                                                      Severity: Minor
                                                                                                                      Found in assets/js/highslide-full.js and 1 other location - About 30 mins to fix
                                                                                                                      assets/js/highslide-with-gallery.js on lines 789..791

                                                                                                                      Duplicated Code

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

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

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