Showing 22 of 190 total issues
Function bigfoot
has 583 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.bigfoot = function(options) {
// ______ ______ _________ _________ ________ ___ __ _______ ______
// /_____/\ /_____/\ /________/\/________/\/_______/\/__/\ /__/\ /______/\ /_____/\
File jquery.chosen.js
has 1042 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Chosen, a Select Box Enhancer for jQuery and Prototype
// by Patrick Filler for Harvest, http://getharvest.com
//
// Version 1.0.0
// Full source at https://github.com/harvesthq/chosen
File jquery.bigfoot.js
has 587 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// _______ ________ _______ ______ ______ ______ _________
// /_______/\ /_______/\/______/\ /_____/\ /_____/\ /_____/\ /________/\
// \::: _ \ \ \__.::._\/\::::__\/__\::::_\/_\:::_ \ \\:::_ \ \\__.::.__\/
// \::(_) \/_ \::\ \ \:\ /____/\\:\/___/\\:\ \ \ \\:\ \ \ \ \::\ \
// \:: _ \ \ _\::\ \__\:\\_ _\/ \:::._\/ \:\ \ \ \\:\ \ \ \ \::\ \
Function lazyload
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.lazyload = function(options) {
var elements = this;
var $container;
var settings = {
threshold : 0,
Function footnoteInit
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var footnoteInit = function() {
// Get all of the possible footnote links
var footnoteButtonSearchQuery;
footnoteButtonSearchQuery = !settings.scope ? "a[href*=\"#\"]" : settings.scope + " a[href*=\"#\"]";
Function addBreakpoint
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var addBreakpoint = function(size, deleteDelay, removeOpen,
trueCallback, falseCallback) {
// Set defaults
deleteDelay = deleteDelay || settings.popoverDeleteDelay;
Function register_observers
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Chosen.prototype.register_observers = function() {
var _this = this;
this.container.bind('mousedown.chosen', function(evt) {
_this.container_mousedown(evt);
Function winnow_results
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
AbstractChosen.prototype.winnow_results = function() {
var escapedSearchText, option, regex, regexAnchor, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
this.no_results_clear();
results = 0;
Function createPopover
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var createPopover = function(selector) {
selector = selector || ".footnote-button";
// Activate all matching if multiple footnotes are allowed
Function set_up_html
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Chosen.prototype.set_up_html = function() {
var container_classes, container_props;
container_classes = ["chosen-container"];
container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
Function result_select
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Chosen.prototype.result_select = function(evt) {
var high, item, selected_index;
if (this.result_highlight) {
high = this.result_highlight;
Function cleanFootnoteLinks
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var cleanFootnoteLinks = function($footnoteAnchors, footnoteLinks) {
var $supParent,
$supChild,
linkHREF,
linkID;
Function keyup_checker
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
AbstractChosen.prototype.keyup_checker = function(evt) {
var stroke, _ref;
stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
this.search_field_scale();
Function bindScrollHandler
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.bindScrollHandler = function() {
// Don't even bother checking if option is set to false
if(!settings.preventPageScroll) { return; }
$(this).on("DOMMouseScroll mousewheel", function(e) {
Function repositionFeet
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var repositionFeet = function() {
if(settings.positionContent) {
$(".footnote-content").each(function() {
Function keydown_checker
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Chosen.prototype.keydown_checker = function(evt) {
var stroke, _ref1;
stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
this.search_field_scale();
Function add_option
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
if (option.nodeName.toUpperCase() === "OPTION") {
if (option.text !== "") {
if (group_position != null) {
this.parsed[group_position].children += 1;
Avoid deeply nested control flow statements. Open
Open
if (results_group != null) {
results_group.group_match = true;
}
Avoid deeply nested control flow statements. Open
Open
} else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
option.search_match = true;
}
Avoid deeply nested control flow statements. Open
Open
if (searchText.length) {
startpos = option.search_text.search(zregex);
text = option.search_text.substr(0, startpos + searchText.length) + '</em>' + option.search_text.substr(startpos + searchText.length);
option.search_text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
}