concord-consortium/lara

View on GitHub
app/assets/javascripts/shutterbug.js

Summary

Maintainability
D
2 days
Test Coverage

Function ShutterbugWorker has 218 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        var ShutterbugWorker = function () {
          function ShutterbugWorker(options) {
            _classCallCheck(this, ShutterbugWorker);

            var opt = options || {};
Severity: Major
Found in app/assets/javascripts/shutterbug.js - About 1 day to fix

    File shutterbug.js has 417 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    (function webpackUniversalModuleDefinition(root, factory) {
      if(typeof exports === 'object' && typeof module === 'object')
        module.exports = factory(require("jquery"));
      else if(typeof define === 'function' && define.amd)
        define(["jquery"], factory);
    Severity: Minor
    Found in app/assets/javascripts/shutterbug.js - About 6 hrs to fix

      Function getHtmlFragment has 80 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  value: function getHtmlFragment(callback) {
                    var _this3 = this;
      
                    var $element = (0, _jquery2.default)(this.element);
      
      
      Severity: Major
      Found in app/assets/javascripts/shutterbug.js - About 3 hrs to fix

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

                    value: function getDomSnapshot() {
                      var _this2 = this;
        
                      this.enableIframeCommunication(); // !!!
                      var timerID = null;
        Severity: Minor
        Found in app/assets/javascripts/shutterbug.js - About 1 hr to fix

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

                  function parseSnapshotArguments(args) {
                    // Remember that selector is anything accepted by jQuery, it can be DOM element too.
                    var selector = void 0;
                    var doneCallback = void 0;
                    var dstSelector = void 0;
          Severity: Minor
          Found in app/assets/javascripts/shutterbug.js - About 1 hr to fix

            There are no issues that match your filters.

            Category
            Status