mambax7/extcal

View on GitHub
assets/js/highslide-with-gallery.js

Summary

Maintainability
F
6 mos
Test Coverage

File highslide-with-gallery.js has 2384 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Name:    Highslide JS
 * Version: 4.1.13 (2011-10-06)
 * Config:  default +slideshow +positioning +transitions +viewport +thumbstrip
 * Author:  Torstein Hønsi
Severity: Major
Found in assets/js/highslide-with-gallery.js - About 6 days to fix

    Consider simplifying this complex logical expression.
    Open

    if (!hs) {
        var hs = {
    // Language strings
            lang: {
                cssDirection: 'ltr',
    Severity: Critical
    Found in assets/js/highslide-with-gallery.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-with-gallery.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 63 (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-with-gallery.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 63 (exceeds 5 allowed). Consider refactoring.
      Open

              getInline: function (types, addOverlay) {
                  for (var i = 0; i < types.length; i++) {
                      var type = types[i], s = null;
                      if (!this[type + 'Id'] && this.thumbsUserSetId)
                          this[type + 'Id'] = type + '-for-' + this.thumbsUserSetId;
      Severity: Minor
      Found in assets/js/highslide-with-gallery.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 59 (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-with-gallery.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 47 (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-with-gallery.js - About 7 hrs to fix

      Cognitive Complexity

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

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

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

      Further reading

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

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

      Cognitive Complexity

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

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

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

      Further reading

      Function mouseClickHandler has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
      Open

              mouseClickHandler: function (e) {
                  if (!e) e = window.event;
                  if (e.button > 1) return true;
                  if (!e.target) e.target = e.srcElement;
      
      
      Severity: Minor
      Found in assets/js/highslide-with-gallery.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 changeSize has a Cognitive Complexity of 43 (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-with-gallery.js - About 6 hrs to fix

      Cognitive Complexity

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

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

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

      Further reading

      Function showHideElements has a Cognitive Complexity of 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-with-gallery.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

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

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

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

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

          Function crossfade has 124 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-with-gallery.js - About 4 hrs to fix

            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-with-gallery.js - About 4 hrs to fix

              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-with-gallery.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-with-gallery.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 28 (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-with-gallery.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 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-with-gallery.js - About 3 hrs to fix

              Cognitive Complexity

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

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

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

              Further reading

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

                      sizeOverlayBox: function (doWrapper, doPanels) {
                          var overlayBox = this.overlayBox,
                              x = this.x,
                              y = this.y;
                          hs.setStyles(overlayBox, {
              Severity: Minor
              Found in assets/js/highslide-with-gallery.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 23 (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-with-gallery.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 79 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-with-gallery.js - About 3 hrs to fix

                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-with-gallery.js - About 3 hrs to fix

                Cognitive Complexity

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

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

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

                Further reading

                Function correctRatio has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                Open

                        correctRatio: function (ratio) {
                            var x = this.x,
                                y = this.y,
                                changed = false,
                                xSize = Math.min(x.full, x.size),
                Severity: Minor
                Found in assets/js/highslide-with-gallery.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 focus has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                Open

                        focus: function () {
                            this.wrapper.style.zIndex = hs.zIndexCounter += 2;
                            // blur others
                            for (var i = 0; i < hs.expanders.length; i++) {
                                if (hs.expanders[i] && i == hs.focusKey) {
                Severity: Minor
                Found in assets/js/highslide-with-gallery.js - About 2 hrs to fix

                Cognitive Complexity

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

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

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

                Further reading

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

                        updateAnchors: function () {
                            var el, els, all = [], images = [], groups = {}, re;
                
                            for (var i = 0; i < hs.openerTagNames.length; i++) {
                                els = document.getElementsByTagName(hs.openerTagNames[i]);
                Severity: Minor
                Found in assets/js/highslide-with-gallery.js - About 2 hrs to fix

                Cognitive Complexity

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

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

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

                Further reading

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

                        getOverlays: function () {
                            this.getInline(['heading', 'caption'], true);
                            this.getNumber();
                            if (this.heading && this.dragByHeading) this.heading.className += ' highslide-move';
                            if (hs.showCredits) this.writeCredits();
                Severity: Minor
                Found in assets/js/highslide-with-gallery.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-with-gallery.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-with-gallery.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 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-with-gallery.js - About 2 hrs to fix

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

                            dragHandler: function (e) {
                                if (!hs.dragArgs) return true;
                                if (!e) e = window.event;
                                var a = hs.dragArgs, exp = a.exp;
                    
                    
                    Severity: Minor
                    Found in assets/js/highslide-with-gallery.js - About 2 hrs to fix

                    Cognitive Complexity

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

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

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

                    Further reading

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

                            wrapperMouseHandler: function (e) {
                                try {
                                    if (!e) e = window.event;
                                    var over = /mouseover/i.test(e.type);
                                    if (!e.target) e.target = e.srcElement; // ie
                    Severity: Minor
                    Found in assets/js/highslide-with-gallery.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-with-gallery.js - About 2 hrs to fix

                    Cognitive Complexity

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

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

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

                    Further reading

                    Function contentLoaded has 60 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-with-gallery.js - About 2 hrs to fix

                      Function changeSize has 59 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-with-gallery.js - About 2 hrs to fix

                        Function init has 54 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-with-gallery.js - About 2 hrs to fix

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

                                  custom: function (from, to, unit) {
                                      this.startTime = (new Date()).getTime();
                                      this.start = from;
                                      this.end = to;
                                      this.unit = unit;// || this.unit || "px";
                          Severity: Minor
                          Found in assets/js/highslide-with-gallery.js - About 2 hrs to fix

                          Cognitive Complexity

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

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

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

                          Further reading

                          Function mouseClickHandler has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

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

                            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-with-gallery.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-with-gallery.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-with-gallery.js - About 1 hr to fix

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

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

                                  Function createOverlay has 40 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-with-gallery.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-with-gallery.js - About 1 hr to fix

                                      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-with-gallery.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 13 (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-with-gallery.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 setSize has a Cognitive Complexity of 13 (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-with-gallery.js - About 1 hr to fix

                                      Cognitive Complexity

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

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

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

                                      Further reading

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

                                          hs.Outline = function (outlineType, onLoad) {
                                              this.onLoad = onLoad;
                                              this.outlineType = outlineType;
                                              var v = hs.uaVersion, tr;
                                      
                                      
                                      Severity: Minor
                                      Found in assets/js/highslide-with-gallery.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-with-gallery.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-with-gallery.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-with-gallery.js - About 1 hr to fix

                                          Function dim has 36 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-with-gallery.js - About 1 hr to fix

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

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

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

                                                      getPageSize: function () {
                                                          var d = document, w = window, iebody = d.compatMode && d.compatMode != 'BackCompat'
                                                                  ? d.documentElement : d.body,
                                                              ieLt9 = hs.ie && (hs.uaVersion < 9 || typeof pageXOffset == 'undefined');
                                              
                                              
                                              Severity: Minor
                                              Found in assets/js/highslide-with-gallery.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 close has a Cognitive Complexity of 12 (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-with-gallery.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-with-gallery.js - About 1 hr to fix

                                                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-with-gallery.js - About 1 hr to fix

                                                  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-with-gallery.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 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-with-gallery.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-with-gallery.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-with-gallery.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-with-gallery.js - About 1 hr to fix

                                                      Function close has 29 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-with-gallery.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-with-gallery.js - About 1 hr to fix

                                                          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-with-gallery.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 10 (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-with-gallery.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 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-with-gallery.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-with-gallery.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 fitOverlayBox has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                                          Open

                                                                  fitOverlayBox: function (ratio, changed) {
                                                                      var x = this.x, y = this.y;
                                                                      if (this.overlayBox) {
                                                                          while (y.size > this.minHeight && x.size > this.minWidth
                                                                          && y.get('wsize') > y.get('fitsize')) {
                                                          Severity: Minor
                                                          Found in assets/js/highslide-with-gallery.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 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-with-gallery.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-with-gallery.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 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-with-gallery.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-with-gallery.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-with-gallery.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-with-gallery.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-with-gallery.js - About 55 mins to fix

                                                          Cognitive Complexity

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

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

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

                                                          Further reading

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

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

                                                            Function showLoading has a Cognitive Complexity of 8 (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-with-gallery.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-with-gallery.js - About 45 mins to fix

                                                              Avoid deeply nested control flow statements.
                                                              Open

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

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

                                                                Cognitive Complexity

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

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

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

                                                                Further reading

                                                                Avoid deeply nested control flow statements.
                                                                Open

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

                                                                  Avoid deeply nested control flow statements.
                                                                  Open

                                                                                          if (exp.slideshow) exp.slideshow.hitSpace();
                                                                  Severity: Major
                                                                  Found in assets/js/highslide-with-gallery.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-with-gallery.js - About 45 mins to fix

                                                                      Avoid deeply nested control flow statements.
                                                                      Open

                                                                                              if (ie6) {
                                                                                                  o.style.width = (overlayBox.offsetWidth + 2 * x.cb
                                                                                                      + x.p1 + x.p2) + 'px';
                                                                                              }
                                                                      Severity: Major
                                                                      Found in assets/js/highslide-with-gallery.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-with-gallery.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 (re[0] == 'hs.expand') hs.push(images, el);
                                                                        Severity: Major
                                                                        Found in assets/js/highslide-with-gallery.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-with-gallery.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-with-gallery.js - About 45 mins to fix

                                                                            Cognitive Complexity

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

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

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

                                                                            Further reading

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

                                                                                    preloadImages: function (number) {
                                                                                        if (number && typeof number != 'object') hs.numberOfImagesToPreload = number;
                                                                            
                                                                                        var arr = hs.getAnchors();
                                                                                        for (var i = 0; i < arr.images.length && i < hs.numberOfImagesToPreload; i++) {
                                                                            Severity: Minor
                                                                            Found in assets/js/highslide-with-gallery.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 (!groups[g]) groups[g] = [];
                                                                            Severity: Major
                                                                            Found in assets/js/highslide-with-gallery.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-with-gallery.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-with-gallery.js - About 45 mins to fix

                                                                                  Avoid deeply nested control flow statements.
                                                                                  Open

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

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

                                                                                            doFullExpand: function () {
                                                                                                try {
                                                                                                    if (this.fullExpandLabel) hs.discardElement(this.fullExpandLabel);
                                                                                    
                                                                                                    this.focus();
                                                                                    Severity: Minor
                                                                                    Found in assets/js/highslide-with-gallery.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 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-with-gallery.js - About 45 mins to fix

                                                                                    Cognitive Complexity

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

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

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

                                                                                    Further reading

                                                                                    Avoid deeply nested control flow statements.
                                                                                    Open

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

                                                                                      Consider simplifying this complex logical expression.
                                                                                      Open

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

                                                                                            Cognitive Complexity

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

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

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

                                                                                            Further reading

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

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

                                                                                            Cognitive Complexity

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

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

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

                                                                                            Further reading

                                                                                            Avoid too many return statements within this function.
                                                                                            Open

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

                                                                                              Avoid too many return statements within this function.
                                                                                              Open

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

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

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

                                                                                                Cognitive Complexity

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

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

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

                                                                                                Further reading

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

                                                                                                        doShowHide: function (visibility) {
                                                                                                            if (hs.hideSelects) this.showHideElements('SELECT', visibility);
                                                                                                            if (hs.hideIframes) this.showHideElements('IFRAME', visibility);
                                                                                                            if (hs.geckoMac) this.showHideElements('*', visibility);
                                                                                                        },
                                                                                                Severity: Minor
                                                                                                Found in assets/js/highslide-with-gallery.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 afterExpand has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                Open

                                                                                                        afterExpand: function () {
                                                                                                            this.isExpanded = true;
                                                                                                            this.focus();
                                                                                                            if (this.dimmingOpacity) hs.dim(this);
                                                                                                            if (hs.upcoming && hs.upcoming == this.a) hs.upcoming = null;
                                                                                                Severity: Minor
                                                                                                Found in assets/js/highslide-with-gallery.js - About 25 mins to fix

                                                                                                Cognitive Complexity

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

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

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

                                                                                                Further reading

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

                                                                                                        expand: function (a, params, custom, type) {
                                                                                                            if (!a) a = hs.createElement('a', null, {display: 'none'}, hs.container);
                                                                                                            if (typeof a.getParams == 'function') return params;
                                                                                                            try {
                                                                                                                new hs.Expander(a, params, custom);
                                                                                                Severity: Minor
                                                                                                Found in assets/js/highslide-with-gallery.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 afterClose has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                Open

                                                                                                        afterClose: function () {
                                                                                                            this.a.className = this.a.className.replace('highslide-active-anchor', '');
                                                                                                
                                                                                                            this.doShowHide('visible');
                                                                                                            if (this.outline && this.outlineWhileAnimating) this.outline.destroy();
                                                                                                Severity: Minor
                                                                                                Found in assets/js/highslide-with-gallery.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-with-gallery.js and 1 other location - About 1 wk to fix
                                                                                                assets/js/highslide-full.js on lines 3202..3335

                                                                                                Duplicated Code

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

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

                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-with-gallery.js and 1 other location - About 1 wk to fix
                                                                                                assets/js/highslide-full.js on lines 2208..2287

                                                                                                Duplicated Code

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

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

                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-with-gallery.js and 2 other locations - About 1 wk to fix
                                                                                                assets/js/highslide-full.js on lines 1149..1240
                                                                                                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-with-gallery.js and 1 other location - About 6 days to fix
                                                                                                assets/js/highslide-full.js on lines 3114..3201

                                                                                                Duplicated Code

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

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

                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-with-gallery.js and 1 other location - About 6 days to fix
                                                                                                assets/js/highslide-full.js on lines 2738..2811

                                                                                                Duplicated Code

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

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

                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-with-gallery.js and 1 other location - About 5 days to fix
                                                                                                assets/js/highslide-full.js on lines 1862..1921

                                                                                                Duplicated Code

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

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

                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-with-gallery.js and 1 other location - About 5 days to fix
                                                                                                assets/js/highslide-full.js on lines 2488..2532

                                                                                                Duplicated Code

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

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

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

                                                                                                Tuning

                                                                                                This issue has a mass of 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-with-gallery.js and 2 other locations - About 4 days to fix
                                                                                                assets/js/highslide-full.js on lines 1024..1090
                                                                                                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 2 locations. Consider refactoring.
                                                                                                Open

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

                                                                                                Duplicated Code

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

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

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

                                                                                                Tuning

                                                                                                This issue has a mass of 671.

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

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

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

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

                                                                                                Refactorings

                                                                                                Further Reading

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

                                                                                                        correctRatio: function (ratio) {
                                                                                                            var x = this.x,
                                                                                                                y = this.y,
                                                                                                                changed = false,
                                                                                                                xSize = Math.min(x.full, x.size),
                                                                                                Severity: Major
                                                                                                Found in assets/js/highslide-with-gallery.js and 2 other locations - About 3 days to fix
                                                                                                assets/js/highslide-full.js on lines 1923..1971
                                                                                                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-with-gallery.js and 1 other location - About 3 days to fix
                                                                                                assets/js/highslide-full.js on lines 1291..1319

                                                                                                Duplicated Code

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

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

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

                                                                                                Duplicated Code

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

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

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

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

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

                                                                                                Duplicated Code

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

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

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

                                                                                                Tuning

                                                                                                This issue has a mass of 438.

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

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

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

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

                                                                                                Refactorings

                                                                                                Further Reading

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

                                                                                                        sizeOverlayBox: function (doWrapper, doPanels) {
                                                                                                            var overlayBox = this.overlayBox,
                                                                                                                x = this.x,
                                                                                                                y = this.y;
                                                                                                            hs.setStyles(overlayBox, {
                                                                                                Severity: Major
                                                                                                Found in assets/js/highslide-with-gallery.js and 2 other locations - About 2 days to fix
                                                                                                assets/js/highslide-full.js on lines 2854..2886
                                                                                                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-with-gallery.js and 1 other location - About 2 days to fix
                                                                                                assets/js/highslide-full.js on lines 1655..1670

                                                                                                Duplicated Code

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

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

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

                                                                                                Duplicated Code

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

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

                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-with-gallery.js and 2 other locations - About 2 days to fix
                                                                                                assets/js/highslide-full.js on lines 1111..1147
                                                                                                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-with-gallery.js and 1 other location - About 2 days to fix
                                                                                                assets/js/highslide-full.js on lines 3354..3386

                                                                                                Duplicated Code

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

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

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

                                                                                                Duplicated Code

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

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

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

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

                                                                                                Duplicated Code

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

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

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

                                                                                                Tuning

                                                                                                This issue has a mass of 346.

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

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

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

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

                                                                                                Refactorings

                                                                                                Further Reading

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

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

                                                                                                Duplicated Code

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

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

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

                                                                                                Tuning

                                                                                                This issue has a mass of 337.

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

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

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

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

                                                                                                Refactorings

                                                                                                Further Reading

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

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

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

                                                                                                Duplicated Code

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

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

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

                                                                                                Tuning

                                                                                                This issue has a mass of 281.

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

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

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

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

                                                                                                Refactorings

                                                                                                Further Reading

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

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

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

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

                                                                                                Duplicated Code

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

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

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

                                                                                                Tuning

                                                                                                This issue has a mass of 263.

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

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

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

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

                                                                                                Refactorings

                                                                                                Further Reading

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

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

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

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

                                                                                                Duplicated Code

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

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

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

                                                                                                Tuning

                                                                                                This issue has a mass of 249.

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

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

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

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

                                                                                                Refactorings

                                                                                                Further Reading

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

                                                                                                        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-with-gallery.js and 1 other location - About 1 day to fix
                                                                                                assets/js/highslide-full.js on lines 673..696

                                                                                                Duplicated Code

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

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

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

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

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

                                                                                                Duplicated Code

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

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

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

                                                                                                Tuning

                                                                                                This issue has a mass of 238.

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

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

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

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

                                                                                                Refactorings

                                                                                                Further Reading

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

                                                                                                        calcThumb: function () {
                                                                                                            this.t = this.exp.el[this.wh] ? parseInt(this.exp.el[this.wh]) :
                                                                                                                this.exp.el['offset' + this.ucwh];
                                                                                                            this.tpos = this.exp.tpos[this.dim];
                                                                                                            this.tb = (this.exp.el['offset' + this.ucwh] - this.t) / 2;
                                                                                                Severity: Major
                                                                                                Found in assets/js/highslide-with-gallery.js and 2 other locations - About 1 day to fix
                                                                                                assets/js/highslide-full.js on lines 1281..1290
                                                                                                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-with-gallery.js and 2 other locations - About 1 day to fix
                                                                                                assets/js/highslide-full.js on lines 890..908
                                                                                                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-with-gallery.js and 2 other locations - About 1 day to fix
                                                                                                assets/js/highslide-full.js on lines 2453..2466
                                                                                                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

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

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

                                                                                                Duplicated Code

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

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

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

                                                                                                Tuning

                                                                                                This issue has a mass of 209.

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

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

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

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

                                                                                                Refactorings

                                                                                                Further Reading

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

                                                                                                        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-with-gallery.js and 1 other location - About 1 day to fix
                                                                                                assets/js/highslide-full.js on lines 554..567

                                                                                                Duplicated Code

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

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

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

                                                                                                Duplicated Code

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

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

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

                                                                                                Duplicated Code

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

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

                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-with-gallery.js and 2 other locations - About 7 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 1242..1252
                                                                                                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-with-gallery.js and 2 other locations - About 7 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 278..296
                                                                                                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-with-gallery.js and 1 other location - About 7 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 1440..1457

                                                                                                Duplicated Code

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

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

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

                                                                                                Duplicated Code

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

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

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

                                                                                                Tuning

                                                                                                This issue has a mass of 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-with-gallery.js and 2 other locations - About 6 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 457..475
                                                                                                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-with-gallery.js and 2 other locations - About 6 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 2837..2853
                                                                                                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 2 locations. Consider refactoring.
                                                                                                Open

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

                                                                                                Duplicated Code

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

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

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

                                                                                                Tuning

                                                                                                This issue has a mass of 158.

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

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

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

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

                                                                                                Refactorings

                                                                                                Further Reading

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

                                                                                                            this.changeSize(
                                                                                                                1, {
                                                                                                                    wrapper: {
                                                                                                                        width: x.get('wsize'),
                                                                                                                        height: y.get('wsize'),
                                                                                                Severity: Major
                                                                                                Found in assets/js/highslide-with-gallery.js and 2 other locations - About 5 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 2002..2018
                                                                                                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-with-gallery.js and 1 other location - About 5 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 2353..2360

                                                                                                Duplicated Code

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

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

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

                                                                                                        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-with-gallery.js and 1 other location - About 5 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 379..389

                                                                                                Duplicated Code

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

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

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

                                                                                                        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-with-gallery.js and 1 other location - About 5 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 2371..2380

                                                                                                Duplicated Code

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

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

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

                                                                                                Tuning

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

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

                                                                                                Duplicated Code

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

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

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

                                                                                                Tuning

                                                                                                This issue has a mass of 149.

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

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

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

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

                                                                                                Refactorings

                                                                                                Further Reading

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

                                                                                                        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-with-gallery.js and 1 other location - About 5 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 659..671

                                                                                                Duplicated Code

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

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

                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-with-gallery.js and 1 other location - About 5 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 3387..3395

                                                                                                Duplicated Code

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

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

                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-with-gallery.js and 2 other locations - About 5 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 852..866
                                                                                                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-with-gallery.js and 1 other location - About 5 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 610..631

                                                                                                Duplicated Code

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

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

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

                                                                                                Tuning

                                                                                                This issue has a mass of 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-with-gallery.js and 2 other locations - About 4 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 492..503
                                                                                                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-with-gallery.js and 1 other location - About 4 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 2422..2436

                                                                                                Duplicated Code

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

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

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

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

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

                                                                                                Duplicated Code

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

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

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

                                                                                                            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-with-gallery.js and 1 other location - About 4 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 81..110

                                                                                                Duplicated Code

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

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

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

                                                                                                    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-with-gallery.js and 1 other location - About 4 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 3107..3113

                                                                                                Duplicated Code

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

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

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

                                                                                                Duplicated Code

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

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

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

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

                                                                                                        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-with-gallery.js and 2 other locations - About 4 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 698..703
                                                                                                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.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-with-gallery.js and 2 other locations - About 3 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 1404..1408
                                                                                                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-with-gallery.js and 2 other locations - About 3 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 1322..1327
                                                                                                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-with-gallery.js and 2 other locations - About 3 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 230..237
                                                                                                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-with-gallery.js and 2 other locations - About 3 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 919..923
                                                                                                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-with-gallery.js and 2 other locations - About 3 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 477..484
                                                                                                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

                                                                                                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-with-gallery.js and 2 other locations - About 3 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 2472..2477
                                                                                                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 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-with-gallery.js and 1 other location - About 3 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 2915..2918

                                                                                                Duplicated Code

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

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

                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-with-gallery.js and 2 other locations - About 3 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 2325..2326
                                                                                                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-with-gallery.js and 2 other locations - About 3 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 1467..1472
                                                                                                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-with-gallery.js and 1 other location - About 3 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 525..537

                                                                                                Duplicated Code

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

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

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

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

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

                                                                                                Duplicated Code

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

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

                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-with-gallery.js and 1 other location - About 3 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 2023..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 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-with-gallery.js and 1 other location - About 3 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 2705..2718

                                                                                                Duplicated Code

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

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

                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-with-gallery.js and 1 other location - About 2 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 544..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 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-with-gallery.js and 2 other locations - About 2 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 2362..2368
                                                                                                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-with-gallery.js and 1 other location - About 2 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 370..378

                                                                                                Duplicated Code

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

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

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

                                                                                                        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-with-gallery.js and 2 other locations - About 2 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 1381..1385
                                                                                                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 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-with-gallery.js and 2 other locations - About 2 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 2048..2058
                                                                                                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 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-with-gallery.js and 1 other location - About 2 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 2183..2191

                                                                                                Duplicated Code

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

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

                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-with-gallery.js and 2 other locations - About 2 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 3339..3349
                                                                                                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-with-gallery.js and 2 other locations - About 2 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 868..878
                                                                                                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-with-gallery.js and 2 other locations - About 2 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 1352..1358
                                                                                                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-with-gallery.js and 2 other locations - About 2 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 1671..1674
                                                                                                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-with-gallery.js and 2 other locations - About 2 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 2346..2350
                                                                                                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-with-gallery.js and 2 other locations - About 2 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 2333..2343
                                                                                                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

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

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

                                                                                                Duplicated Code

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

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

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

                                                                                                Tuning

                                                                                                This issue has a mass of 79.

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

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

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

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

                                                                                                Refactorings

                                                                                                Further Reading

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

                                                                                                        calcBorders: function () {
                                                                                                            // correct for borders
                                                                                                            this.cb = (this.exp.content['offset' + this.ucwh] - this.t) / 2;
                                                                                                
                                                                                                            this.marginMax = hs['margin' + this.ucrb];
                                                                                                Severity: Major
                                                                                                Found in assets/js/highslide-with-gallery.js and 2 other locations - About 2 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 1275..1280
                                                                                                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 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-with-gallery.js and 1 other location - About 2 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 1490..1494

                                                                                                Duplicated Code

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

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

                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-with-gallery.js and 2 other locations - About 2 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 2581..2585
                                                                                                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-with-gallery.js and 2 other locations - About 2 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 709..712
                                                                                                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-with-gallery.js and 2 other locations - About 2 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 1017..1023
                                                                                                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.tb - x.cb) + 'px',
                                                                                                                    top: (y.tpos + x.tb - y.cb) + 'px'
                                                                                                                });
                                                                                                Severity: Major
                                                                                                Found in assets/js/highslide-with-gallery.js and 3 other locations - About 2 hrs to fix
                                                                                                assets/js/highslide-full.js on lines 1631..1634
                                                                                                assets/js/highslide-full.js on lines 2064..2067
                                                                                                assets/js/highslide.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-with-gallery.js and 2 other locations - About 1 hr to fix
                                                                                                assets/js/highslide-full.js on lines 1425..1433
                                                                                                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-with-gallery.js and 1 other location - About 1 hr to fix
                                                                                                assets/js/highslide-full.js on lines 1347..1350

                                                                                                Duplicated Code

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

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

                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-with-gallery.js and 2 other locations - About 1 hr to fix
                                                                                                assets/js/highslide-full.js on lines 2483..2487
                                                                                                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-with-gallery.js and 2 other locations - About 1 hr to fix
                                                                                                assets/js/highslide-full.js on lines 977..981
                                                                                                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-with-gallery.js and 2 other locations - About 1 hr to fix
                                                                                                assets/js/highslide-full.js on lines 2446..2449
                                                                                                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-with-gallery.js and 2 other locations - About 1 hr to fix
                                                                                                assets/js/highslide-full.js on lines 925..937
                                                                                                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-with-gallery.js and 2 other locations - About 1 hr to fix
                                                                                                assets/js/highslide-full.js on lines 2731..2735
                                                                                                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-with-gallery.js and 2 other locations - About 1 hr to fix
                                                                                                assets/js/highslide-full.js on lines 1462..1465
                                                                                                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-with-gallery.js and 2 other locations - About 1 hr to fix
                                                                                                assets/js/highslide-full.js on lines 1362..1367
                                                                                                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-with-gallery.js and 2 other locations - About 1 hr to fix
                                                                                                assets/js/highslide-full.js on lines 2069..2072
                                                                                                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-with-gallery.js and 1 other location - About 1 hr to fix
                                                                                                assets/js/highslide-full.js on lines 2911..2914

                                                                                                Duplicated Code

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

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

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

                                                                                                Tuning

                                                                                                This issue has a mass of 61.

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

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

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

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

                                                                                                Refactorings

                                                                                                Further Reading

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

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

                                                                                                Duplicated Code

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

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

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

                                                                                                Duplicated Code

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

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

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

                                                                                                Duplicated Code

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

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

                                                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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-with-gallery.js and 2 other locations - About 1 hr to fix
                                                                                                assets/js/highslide-full.js on lines 1495..1498
                                                                                                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-with-gallery.js and 2 other locations - About 1 hr to fix
                                                                                                assets/js/highslide-full.js on lines 972..973
                                                                                                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-with-gallery.js and 2 other locations - About 1 hr to fix
                                                                                                assets/js/highslide-full.js on lines 215..216
                                                                                                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-with-gallery.js and 2 other locations - About 1 hr to fix
                                                                                                assets/js/highslide-full.js on lines 2932..2938
                                                                                                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

                                                                                                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-with-gallery.js and 2 other locations - About 1 hr to fix
                                                                                                assets/js/highslide-full.js on lines 588..592
                                                                                                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

                                                                                                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-with-gallery.js and 1 other location - About 1 hr to fix
                                                                                                assets/js/highslide-full.js on lines 2165..2168

                                                                                                Duplicated Code

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

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

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

                                                                                                Tuning

                                                                                                This issue has a mass of 55.

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

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

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

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

                                                                                                Refactorings

                                                                                                Further Reading

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

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

                                                                                                Duplicated Code

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

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

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

                                                                                                Tuning

                                                                                                This issue has a mass of 54.

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

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

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

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

                                                                                                Refactorings

                                                                                                Further Reading

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

                                                                                                            var p = hs.page, mX = hs.mouse.x + p.scrollLeft, mY = hs.mouse.y + p.scrollTop;
                                                                                                Severity: Major
                                                                                                Found in assets/js/highslide-with-gallery.js and 2 other locations - About 55 mins to fix
                                                                                                assets/js/highslide-full.js on lines 2324..2324
                                                                                                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-with-gallery.js and 2 other locations - About 50 mins to fix
                                                                                                assets/js/highslide-full.js on lines 654..656
                                                                                                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-with-gallery.js and 1 other location - About 50 mins to fix
                                                                                                assets/js/highslide-full.js on lines 2173..2181

                                                                                                Duplicated Code

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

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

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

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

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

                                                                                                    hs.addEventListener(document, 'mousemove', function (e) {
                                                                                                        hs.mouse = {x: e.clientX, y: e.clientY};
                                                                                                    });
                                                                                                Severity: Major
                                                                                                Found in assets/js/highslide-with-gallery.js and 2 other locations - About 40 mins to fix
                                                                                                assets/js/highslide-full.js on lines 3396..3398
                                                                                                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-with-gallery.js and 2 other locations - About 40 mins to fix
                                                                                                assets/js/highslide-full.js on lines 2443..2444
                                                                                                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-with-gallery.js and 2 other locations - About 35 mins to fix
                                                                                                assets/js/highslide-full.js on lines 2059..2062
                                                                                                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-with-gallery.js and 2 other locations - About 30 mins to fix
                                                                                                assets/js/highslide-full.js on lines 505..508
                                                                                                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-with-gallery.js and 1 other location - About 30 mins to fix
                                                                                                assets/js/highslide-full.js on lines 967..969

                                                                                                Duplicated Code

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

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

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