otwcode/otwarchive

View on GitHub
public/javascripts/ao3modal.js

Summary

Maintainability
D
1 day
Test Coverage

Function ao3modal has 268 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    window.ao3modal = (function($) {

        var _loading = false,
            _bgDiv = $('<div>', {'id': 'modal-bg'}).addClass('modal-closer'),
            _loadingDiv = $('<div>').addClass('loading'),
Severity: Major
Found in public/javascripts/ao3modal.js - About 1 day to fix

    File ao3modal.js has 272 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
    
    THIS FILE GETS MINIFIED!  It is included as "ao3modal.min.js".
    USE A MINIFIER AND UPDATE THE .min.js FILE AFTER MAKING ANY CHANGES HERE!
    
    
    Severity: Minor
    Found in public/javascripts/ao3modal.js - About 2 hrs to fix

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

              function _show(href, title) {
                  _modalDiv.hide();
                  _wrapDiv.show();
                  if ($.support.opacity) { _bgDiv.add(_loadingDiv).fadeIn(); }
                  else { _bgDiv.add(_loadingDiv).show(); }
      Severity: Minor
      Found in public/javascripts/ao3modal.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status