hnrysmth/global-thermonuclear-war

View on GitHub

Showing 120 of 120 total issues

Avoid deeply nested control flow statements.
Open

    if(matchedCount>0){while(i--){if(!(unmatched[i]||setMatched[i])){setMatched[i]=pop.call(results);}}}// Discard index placeholder values to get only actual matches
Severity: Major
Found in app.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

        sel=handleObj.selector+" ";if(matchedSelectors[sel]===undefined){matchedSelectors[sel]=handleObj.needsContext?jQuery(sel,this).index(cur)>-1:jQuery.find(sel,this,null,[cur]).length;}if(matchedSelectors[sel]){matchedHandlers.push(handleObj);}}if(matchedHandlers.length){handlerQueue.push({elem:cur,handlers:matchedHandlers});}}}}// Add the remaining (directly-bound) handlers
    Severity: Major
    Found in app.js - About 45 mins to fix

      Function _on has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          function safeActiveElement(){try{return document.activeElement;}catch(err){}}function _on(elem,types,selector,data,fn,one){var origFn,type;// Types can be a map of types/handlers
      Severity: Minor
      Found in app.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

            if(nodeType===9){if(elem=context.getElementById(m)){// Support: IE, Opera, Webkit
            // TODO: identify versions
            // getElementById can match elements by name instead of ID
            if(elem.id===m){results.push(elem);return results;}}else{return results;}// Element context
            }else{// Support: IE, Opera, Webkit
        Severity: Major
        Found in app.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

              function stripAndCollapse(value){var tokens=value.match(rnothtmlwhite)||[];return tokens.join(" ");}function getClass(elem){return elem.getAttribute&&elem.getAttribute("class")||"";}jQuery.fn.extend({addClass:function addClass(value){var classes,elem,cur,curValue,clazz,j,finalValue,i=0;if(jQuery.isFunction(value)){return this.each(function(j){jQuery(this).addClass(value.call(this,j,getClass(this)));});}if(typeof value==="string"&&value){classes=value.match(rnothtmlwhite)||[];while(elem=this[i++]){curValue=getClass(elem);cur=elem.nodeType===1&&" "+stripAndCollapse(curValue)+" ";if(cur){j=0;while(clazz=classes[j++]){if(cur.indexOf(" "+clazz+" ")<0){cur+=clazz+" ";}}// Only assign if different to avoid unneeded rendering.
          Severity: Major
          Found in app.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                if(conv&&s.throws){response=conv(response);}else{try{response=conv(response);}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current};}}}}}}return{state:"success",data:response};}jQuery.extend({// Counter for holding the number of active queries
            Severity: Major
            Found in app.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                  tokens.splice(i,1);selector=seed.length&&toSelector(tokens);if(!selector){push.apply(results,seed);return results;}break;}}}}// Compile and execute a filtering function if one is not provided
              Severity: Major
              Found in app.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                    while(cur.indexOf(" "+clazz+" ")>-1){cur=cur.replace(" "+clazz+" "," ");}}// Only assign if different to avoid unneeded rendering.
                Severity: Major
                Found in app.js - About 45 mins to fix

                  Function iterator has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          function iterator(obj, iteratee, memo, keys, index, length) {
                  Severity: Minor
                  Found in app.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                        }else if(copy!==undefined){target[name]=copy;}}}}// Return the modified object
                    Severity: Major
                    Found in app.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                          for(i=0;i<hasScripts;i++){node=scripts[i];if(rscriptType.test(node.type||"")&&!dataPriv.access(node,"globalEval")&&jQuery.contains(doc,node)){if(node.src){// Optional AJAX dependency, but won't run scripts if not present
                          if(jQuery._evalUrl){jQuery._evalUrl(node.src);}}else{DOMEval(node.textContent.replace(rcleanScript,""),doc);}}}}}}return collection;}function _remove(elem,selector,keepData){var node,nodes=selector?jQuery.filter(selector,elem):elem,i=0;for(;(node=nodes[i])!=null;i++){if(!keepData&&node.nodeType===1){jQuery.cleanData(getAll(node));}if(node.parentNode){if(keepData&&jQuery.contains(node.ownerDocument,node)){setGlobalEval(getAll(node,"script"));}node.parentNode.removeChild(node);}}return elem;}jQuery.extend({htmlPrefilter:function htmlPrefilter(html){return html.replace(rxhtmlTag,"<$1></$2>");},clone:function clone(elem,dataAndEvents,deepDataAndEvents){var i,l,srcElements,destElements,clone=elem.cloneNode(true),inPage=jQuery.contains(elem.ownerDocument,elem);// Fix IE cloning issues
                      Severity: Major
                      Found in app.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                            if(!propTween){anim.done(function(){style.display=restoreDisplay;});if(restoreDisplay==null){display=style.display;restoreDisplay=display==="none"?"":display;}}style.display="inline-block";}}}if(opts.overflow){style.overflow="hidden";anim.always(function(){style.overflow=opts.overflow[0];style.overflowX=opts.overflow[1];style.overflowY=opts.overflow[2];});}// Implement show/hide animations
                        Severity: Major
                        Found in app.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                              if(!conv){for(conv2 in converters){// If conv2 outputs current
                              tmp=conv2.split(" ");if(tmp[1]===current){// If prev can be converted to accepted input
                              conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]];if(conv){// Condense equivalence converters
                              if(conv===true){conv=converters[conv2];// Otherwise, insert the intermediate dataType
                              }else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}}// Apply converter (if not an equivalence)
                          Severity: Major
                          Found in app.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                if(simple){while(dir){node=elem;while(node=node[dir]){if(ofType?node.nodeName.toLowerCase()===name:node.nodeType===1){return false;}}// Reverse direction for :only-* (if we haven't yet done so)
                            Severity: Major
                            Found in app.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                  sel=handleObj.selector+" ";if(matchedSelectors[sel]===undefined){matchedSelectors[sel]=handleObj.needsContext?jQuery(sel,this).index(cur)>-1:jQuery.find(sel,this,null,[cur]).length;}if(matchedSelectors[sel]){matchedHandlers.push(handleObj);}}if(matchedHandlers.length){handlerQueue.push({elem:cur,handlers:matchedHandlers});}}}}// Add the remaining (directly-bound) handlers
                              Severity: Major
                              Found in app.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                    if(hasScripts){// Support: Android <=4.0 only, PhantomJS 1 only
                                    // push.apply(_, arraylike) throws on ancient WebKit
                                    jQuery.merge(scripts,getAll(node,"script"));}}callback.call(collection[i],node,i);}if(hasScripts){doc=scripts[scripts.length-1].ownerDocument;// Reenable scripts
                                Severity: Major
                                Found in app.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                      while(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop()){if((ofType?node.nodeName.toLowerCase()===name:node.nodeType===1)&&++diff){// Cache the index of each encountered element
                                      if(useCache){outerCache=node[expando]||(node[expando]={});// Support: IE <9 only
                                      // Defend against cloned attroperties (jQuery gh-1709)
                                      uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});uniqueCache[type]=[dirruns,diff];}if(node===elem){break;}}}}}// Incorporate the offset, then check against cycle size
                                  Severity: Major
                                  Found in app.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                        temp=[];i=matcherOut.length;while(i--){if(elem=matcherOut[i]){// Restore matcherIn since elem is not yet a final match
                                        temp.push(matcherIn[i]=elem);}}postFinder(null,matcherOut=[],temp,xml);}// Move matched elements from seed to results to keep them synchronized
                                    Severity: Major
                                    Found in app.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                          if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){for(match in context){// Properties of context are called as methods if possible
                                          if(jQuery.isFunction(this[match])){this[match](context[match]);// ...and otherwise set as attributes
                                          }else{this.attr(match,context[match]);}}}return this;// HANDLE: $(#id)
                                      Severity: Major
                                      Found in app.js - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                            return clone;},cleanData:function cleanData(elems){var data,elem,type,special=jQuery.event.special,i=0;for(;(elem=elems[i])!==undefined;i++){if(acceptData(elem)){if(data=elem[dataPriv.expando]){if(data.events){for(type in data.events){if(special[type]){jQuery.event.remove(elem,type);// This is a shortcut to avoid jQuery.event.remove's overhead
                                            }else{jQuery.removeEvent(elem,type,data.handle);}}}// Support: Chrome <=35 - 45+
                                        Severity: Major
                                        Found in app.js - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language