spotweb/spotweb

View on GitHub
templates/we1rdo/js/scripts.js

Summary

Maintainability
F
1 wk
Test Coverage

File scripts.js has 1090 lines of code (exceeds 250 allowed). Consider refactoring.
Open

$.address.init(function() {
    $('.spotlink').address();
}).externalChange(
        function(event) {
            basePATH = location.href.replace('#' + $.address.value(), '');
Severity: Major
Found in templates/we1rdo/js/scripts.js - About 2 days to fix

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

    function spotEditLoadCategoryIntoSelectbox(selectId, titleElm, data, async, doClear, subcategory) {
        if (typeof subcategory == "undefined") { subcategory = new Array(); }
    
        var $selectbox = $("#" + selectId);
        if (titleElm) {
    Severity: Minor
    Found in templates/we1rdo/js/scripts.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 loadCategoryIntoSelectbox has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
    Open

    function loadCategoryIntoSelectbox(selectId, titleElm, data, async, doClear) {
        var $selectbox = $("#" + selectId);
        if (titleElm) {
            var $titleElm = $("#" + titleElm);
        } else {
    Severity: Minor
    Found in templates/we1rdo/js/scripts.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 initSliders has 60 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function initSliders(BetweenText, AndText) {
        var _1MB = 1024 * 1024;
        var _1GB = 1024 * 1024 * 1024;
    
        var realValues     = [0, _1MB, _1MB * 10, _1MB * 50, _1MB * 512, _1GB, _1GB * 4, _1GB * 6, _1GB * 8, _1GB * 12, _1GB * 16, _1GB * 24, _1GB * 32, _1GB * 48, _1GB * 64, _1GB * 96, _1GB * 128, _1GB * 256];
    Severity: Major
    Found in templates/we1rdo/js/scripts.js - About 2 hrs to fix

      Function spotEditLoadCategoryIntoSelectbox has 53 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function spotEditLoadCategoryIntoSelectbox(selectId, titleElm, data, async, doClear, subcategory) {
          if (typeof subcategory == "undefined") { subcategory = new Array(); }
      
          var $selectbox = $("#" + selectId);
          if (titleElm) {
      Severity: Major
      Found in templates/we1rdo/js/scripts.js - About 2 hrs to fix

        Function downloadMultiNZB has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
        Open

        function downloadMultiNZB(dltype) {
            var count = $('td.multinzb input[type="checkbox"]:checked').length;
            if(count > 0) {
                /*
                 * with client-sabnzbd we override to display as we cannot send
        Severity: Minor
        Found in templates/we1rdo/js/scripts.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 postCommentsForm has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function postCommentsForm() {
            $("li.addComment a.togglePostComment").click(function(){
                if($("li.addComment div").is(":hidden")) {
                    $("li.addComment div").slideDown(function(){
                        detectScrollbar();
        Severity: Minor
        Found in templates/we1rdo/js/scripts.js - About 1 hr to fix

          Function loadCategoryIntoSelectbox has 46 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function loadCategoryIntoSelectbox(selectId, titleElm, data, async, doClear) {
              var $selectbox = $("#" + selectId);
              if (titleElm) {
                  var $titleElm = $("#" + titleElm);
              } else {
          Severity: Minor
          Found in templates/we1rdo/js/scripts.js - About 1 hr to fix

            Function openSpot has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function openSpot(id,url) {
                if (!spotweb_security_allow_spotdetail) {
                    return false;
                } // if
                
            Severity: Minor
            Found in templates/we1rdo/js/scripts.js - About 1 hr to fix

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

              function downloadMultiNZB(dltype) {
                  var count = $('td.multinzb input[type="checkbox"]:checked').length;
                  if(count > 0) {
                      /*
                       * with client-sabnzbd we override to display as we cannot send
              Severity: Minor
              Found in templates/we1rdo/js/scripts.js - About 1 hr to fix

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

                function postCommentsForm() {
                    $("li.addComment a.togglePostComment").click(function(){
                        if($("li.addComment div").is(":hidden")) {
                            $("li.addComment div").slideDown(function(){
                                detectScrollbar();
                Severity: Minor
                Found in templates/we1rdo/js/scripts.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 submitFilterBtn has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function submitFilterBtn(searchform) {
                    var valelems = searchform.elements['search[value][]'];
                    
                    // We zetten nu de filter om naar een moderner soort filter
                    for (var i=0; i < searchform.elements['search[type]'].length; i++) {
                Severity: Minor
                Found in templates/we1rdo/js/scripts.js - About 1 hr to fix

                  Function validateNntpServerSetting has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function validateNntpServerSetting(settingsForm, serverArrayId) {
                      $("#servertest_" + serverArrayId + "_loading").show();
                  
                      var formData = 'data[host]=' + settingsForm.elements[settingsForm.name + '[' + serverArrayId + '][host]'].value;
                  
                  
                  Severity: Minor
                  Found in templates/we1rdo/js/scripts.js - About 1 hr to fix

                    Function success has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            success: function(msg) {
                                $selectbox.data('fromurl', $.toJSON(data));
                                var htmlData = '';
                    
                                if ($titleElm) {
                    Severity: Minor
                    Found in templates/we1rdo/js/scripts.js - About 1 hr to fix

                      Function bindSelectedSortableFilter has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function bindSelectedSortableFilter() {
                          /* Koppel de nestedSortable aan de sortablefilterlist */
                          var $sortablefilterlist = $('#sortablefilterlist');
                          if ($sortablefilterlist) {
                              $sortablefilterlist.nestedSortable({
                      Severity: Minor
                      Found in templates/we1rdo/js/scripts.js - About 1 hr to fix

                        Function attachAdvancedSearchBehaviour has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function attachAdvancedSearchBehaviour(BetweenText, AndText) {
                        // console.time("7th-ready");
                            //ready
                            $("input.searchbox").focus(function(){
                                if($("form#filterform .advancedSearch").is(":hidden")) {
                        Severity: Minor
                        Found in templates/we1rdo/js/scripts.js - About 1 hr to fix

                          Function initializeUserPreferencesScreen has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function initializeUserPreferencesScreen() {
                              $("#edituserpreferencetabs").tabs();
                          
                              /* If the user preferences tab is loaded, make the filters sortable */
                              $('#edituserpreferencetabs').bind('tabsload', function(event, ui) {
                          Severity: Minor
                          Found in templates/we1rdo/js/scripts.js - About 1 hr to fix

                            Function findNearest has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                            Open

                            function findNearest(possibleValues, realValues, includeLeft, includeRight, value) {
                                var nearest = null;
                                var realValue = null;
                                var diff = null;
                                for (var i = 0; i < possibleValues.length; i++) {
                            Severity: Minor
                            Found in templates/we1rdo/js/scripts.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 attachInfiniteScroll has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function attachInfiniteScroll() {
                                //ready
                            // console.time("2nd-ready");
                                var pagenr = $('#nextPage').val();
                                $(window).scroll(function() {
                            Severity: Minor
                            Found in templates/we1rdo/js/scripts.js - About 1 hr to fix

                              Function initSliders has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                              Open

                              function initSliders(BetweenText, AndText) {
                                  var _1MB = 1024 * 1024;
                                  var _1GB = 1024 * 1024 * 1024;
                              
                                  var realValues     = [0, _1MB, _1MB * 10, _1MB * 50, _1MB * 512, _1GB, _1GB * 4, _1GB * 6, _1GB * 8, _1GB * 12, _1GB * 16, _1GB * 24, _1GB * 32, _1GB * 48, _1GB * 64, _1GB * 96, _1GB * 128, _1GB * 256];
                              Severity: Minor
                              Found in templates/we1rdo/js/scripts.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 spotEditCategorySelectChanged has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              function spotEditCategorySelectChanged(category, subcata, subcatb, subcatc, subcatd, subcatz) {
                              Severity: Minor
                              Found in templates/we1rdo/js/scripts.js - About 45 mins to fix

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

                                function spotEditLoadCategoryIntoSelectbox(selectId, titleElm, data, async, doClear, subcategory) {
                                Severity: Minor
                                Found in templates/we1rdo/js/scripts.js - About 45 mins to fix

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

                                  function applyTipTip(){
                                  var categories = $(this).data('cats');
                                          if(!categories) return;
                                          var dl = "<ul>";
                                          var list = $.map(categories, function(value, key){
                                  Severity: Minor
                                  Found in templates/we1rdo/js/scripts.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 spotNav has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  function spotNav(direction) {    
                                      var current = $('table.spots tbody tr.active');
                                      var prev = current.prevUntil('tr.header').first();
                                      var next = current.next().first();
                                  
                                  
                                  Severity: Minor
                                  Found in templates/we1rdo/js/scripts.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 submitFilterBtn has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  function submitFilterBtn(searchform) {
                                      var valelems = searchform.elements['search[value][]'];
                                      
                                      // We zetten nu de filter om naar een moderner soort filter
                                      for (var i=0; i < searchform.elements['search[type]'].length; i++) {
                                  Severity: Minor
                                  Found in templates/we1rdo/js/scripts.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 addSpotFilter has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                  function addSpotFilter(xsrf, filterType, filterValue, filterName, addElementClass) {
                                  Severity: Minor
                                  Found in templates/we1rdo/js/scripts.js - About 35 mins to fix

                                    Function loadCategoryIntoSelectbox has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    function loadCategoryIntoSelectbox(selectId, titleElm, data, async, doClear) {
                                    Severity: Minor
                                    Found in templates/we1rdo/js/scripts.js - About 35 mins to fix

                                      Function removeFilter has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                      function removeFilter(href, fieldname, operator, booloper, value) {
                                      Severity: Minor
                                      Found in templates/we1rdo/js/scripts.js - About 35 mins to fix

                                        Function findNearest has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                        function findNearest(possibleValues, realValues, includeLeft, includeRight, value) {
                                        Severity: Minor
                                        Found in templates/we1rdo/js/scripts.js - About 35 mins to fix

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

                                          function toggleSidebarPanel(id) {
                                              if($(id).is(":visible")) {
                                                  $(id).fadeOut();
                                              } else {
                                                  if($(".sidebarPanel").is(":visible")) {
                                          Severity: Minor
                                          Found in templates/we1rdo/js/scripts.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 downloadSabnzbd has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                          function downloadSabnzbd(id,url, dltype) {
                                              $(".sab_"+id).removeClass("succes").addClass("loading");
                                              
                                              /*
                                               * Get the URL, do not rely on the result handler always
                                          Severity: Minor
                                          Found in templates/we1rdo/js/scripts.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

                                              } else if (direction == 'next' && next.size() == 1) {
                                                  current.removeClass('active');
                                                  next.addClass('active');
                                                  if($("#overlay").is(':visible')) {
                                                      $("div.container").removeClass("hidden").addClass("visible");
                                          Severity: Major
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 4 hrs to fix
                                          templates/we1rdo/js/scripts.js on lines 447..463

                                          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 116.

                                          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 (direction == 'prev' && prev.size() == 1) {
                                                  current.removeClass('active');
                                                  prev.addClass('active');
                                                  if($("#overlay").is(':visible')) {
                                                      $("div.container").removeClass("hidden").addClass("visible");
                                          Severity: Major
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 4 hrs to fix
                                          templates/we1rdo/js/scripts.js on lines 455..463

                                          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 116.

                                          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

                                          function markAsRead() {
                                              var url = $("ul.maintenancebox a.markasread").attr("href");
                                          
                                              $("li.info").html("<img src='templates/we1rdo/img/loading.gif' />");
                                              $.get(url, function(data) {
                                          Severity: Major
                                          Found in templates/we1rdo/js/scripts.js and 2 other locations - About 3 hrs to fix
                                          templates/we1rdo/js/scripts.js on lines 900..908
                                          templates/we1rdo/js/scripts.js on lines 910..918

                                          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 107.

                                          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

                                          function retrieveSpots() {
                                              var url = $("ul.maintenancebox a.retrievespots").attr("href");
                                          
                                              $("li.info").html("<img src='templates/we1rdo/img/loading.gif' />");
                                              $.get(url, function(data) {
                                          Severity: Major
                                          Found in templates/we1rdo/js/scripts.js and 2 other locations - About 3 hrs to fix
                                          templates/we1rdo/js/scripts.js on lines 910..918
                                          templates/we1rdo/js/scripts.js on lines 920..928

                                          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 107.

                                          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

                                          function eraseDownloads() {
                                              var url = $("ul.maintenancebox a.erasedownloads").attr("href");
                                          
                                              $("li.info").html("<img src='templates/we1rdo/img/loading.gif' />");
                                              $.get(url, function(data) {
                                          Severity: Major
                                          Found in templates/we1rdo/js/scripts.js and 2 other locations - About 3 hrs to fix
                                          templates/we1rdo/js/scripts.js on lines 900..908
                                          templates/we1rdo/js/scripts.js on lines 920..928

                                          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 107.

                                          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(value.state == "block") {
                                                          $("ul.subfilterlist").parent().eq(value.count).children("a").children("span.toggle").css("background-position", "-77px -98px");
                                                          $("ul.subfilterlist").parent().eq(value.count).children("a").children("span.toggle").attr("title", "<t>Collapse filter</t>");
                                                      } else {
                                          Severity: Major
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 3 hrs to fix
                                          templates/we1rdo/js/scripts.js on lines 860..864

                                          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

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

                                                      } else {
                                                          $("ul.subfilterlist").parent().eq(value.count).children("a").children("span.toggle").css("background-position", "-90px -98px");
                                                          $("ul.subfilterlist").parent().eq(value.count).children("a").children("span.toggle").attr("title", "<t>Expand filter</t>");
                                          
                                                      }
                                          Severity: Major
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 3 hrs to fix
                                          templates/we1rdo/js/scripts.js on lines 857..860

                                          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

                                              $( "#human-filesize" ).text(BetweenText + format_size( parseInt($( "#min-filesize").val().substring("filesize:>:DEF:".length)) ) + AndText + format_size( parseInt($( "#max-filesize").val().substring("filesize:>:DEF:".length) )) );
                                          Severity: Major
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 2 hrs to fix
                                          templates/we1rdo/js/scripts.js on lines 1412..1412

                                          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 2 locations. Consider refactoring.
                                          Open

                                                      $( "#human-filesize" ).text( BetweenText + format_size( parseInt($( "#min-filesize").val().substring("filesize:>:DEF:".length)) ) + AndText + format_size( parseInt($( "#max-filesize").val().substring("filesize:>:DEF:".length) )) );
                                          Severity: Major
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 2 hrs to fix
                                          templates/we1rdo/js/scripts.js on lines 1441..1441

                                          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 2 locations. Consider refactoring.
                                          Open

                                                      if ($selectbox[0].options.length < 2) {
                                                          if ($titleElm) { $titleElm.hide(); }
                                                          $selectbox.hide();
                                                      } else {
                                                          if ($titleElm) { $titleElm.show(); }
                                          Severity: Major
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 2 hrs to fix
                                          templates/we1rdo/js/scripts.js on lines 1233..1239

                                          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 2 locations. Consider refactoring.
                                          Open

                                                      if ($selectbox[0].options.length < 2) {
                                                          if ($titleElm) { $titleElm.hide(); }
                                                          $selectbox.hide();
                                                      } else {
                                                          if ($titleElm) { $titleElm.show(); }
                                          Severity: Major
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 2 hrs to fix
                                          templates/we1rdo/js/scripts.js on lines 1151..1157

                                          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 2 locations. Consider refactoring.
                                          Open

                                              if($(ul).is(":visible")) {
                                                  ul.hide();
                                                  ul.prev().children("span.toggle").css("background-position", "-90px -98px");
                                                  ul.prev().children("span.toggle").attr("title", "<t>Expand filter</t>");
                                              } else {
                                          Severity: Major
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 1 hr to fix
                                          templates/we1rdo/js/scripts.js on lines 878..882

                                          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

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

                                              } else {
                                                  ul.show();
                                                  ul.prev().children("span.toggle").css("background-position", "-77px -98px");
                                                  ul.prev().children("span.toggle").attr("title", "<t>Collapse filter</t>");
                                              }
                                          Severity: Major
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 1 hr to fix
                                          templates/we1rdo/js/scripts.js on lines 874..878

                                          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

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

                                                  } else {
                                                      $("li.addComment div").slideUp(function(){
                                                          detectScrollbar();
                                                      });
                                                      $("li.addComment a.togglePostComment span").removeClass("up").parent().attr("title", "<t>Add comment (show)</t>");
                                          Severity: Major
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 1 hr to fix
                                          templates/we1rdo/js/scripts.js on lines 319..324

                                          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

                                                  if($("li.addComment div").is(":hidden")) {
                                                      $("li.addComment div").slideDown(function(){
                                                          detectScrollbar();
                                                      });
                                                      $("li.addComment a.togglePostComment span").addClass("up").parent().attr("title", "<t>Add comment (hide)</t>");
                                          Severity: Major
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 1 hr to fix
                                          templates/we1rdo/js/scripts.js on lines 324..329

                                          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

                                                  if(value.state != "none") {
                                                      $("div#filter > a.viewState").eq(value.count).children("h4").children("span").removeClass("down").addClass("up");
                                                  } else {
                                          Severity: Minor
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 55 mins to fix
                                          templates/we1rdo/js/scripts.js on lines 597..599

                                          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

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

                                                      } else {
                                                          slider.slider('values', 1, fixedValues[0]);
                                                          $( "#max-filesize" ).val( "filesize:<:DEF:" + fixedValues[1]);
                                                          sliderMaxFileSize = fixedValues[1];
                                                      } // else
                                          Severity: Minor
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 55 mins to fix
                                          templates/we1rdo/js/scripts.js on lines 1402..1406

                                          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

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

                                                  } else {
                                                      $("div#filter > a.viewState").eq(value.count).children("h4").children("span").removeClass("up").addClass("down");
                                                  }
                                          Severity: Minor
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 55 mins to fix
                                          templates/we1rdo/js/scripts.js on lines 595..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 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

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

                                                      if (ui.value == ui.values[0]) {
                                                          slider.slider('values', 0, fixedValues[0]);
                                                          $( "#min-filesize" ).val( "filesize:>:DEF:" + fixedValues[1]);
                                                          sliderMinFileSize = fixedValues[1];
                                                      } else {
                                          Severity: Minor
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 55 mins to fix
                                          templates/we1rdo/js/scripts.js on lines 1406..1410

                                          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

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

                                              $document.bind('keydown', 'return', function(){if($("#overlay").is(':hidden')){$('table.spots tbody tr.active .title a.spotlink').click()}});
                                          Severity: Minor
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 50 mins to fix
                                          templates/we1rdo/js/scripts.js on lines 426..426

                                          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 51.

                                          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

                                              $document.bind('keydown', 'o', function(){if($("#overlay").is(':hidden')){$('table.spots tbody tr.active .title a.spotlink').click()}});
                                          Severity: Minor
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 50 mins to fix
                                          templates/we1rdo/js/scripts.js on lines 427..427

                                          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 51.

                                          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 ($('#min-filesize').val() == 'filesize:>:DEF:0') {
                                                  $('form#filterform').find('#min-filesize').remove();
                                              } // if
                                          Severity: Minor
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 40 mins to fix
                                          templates/we1rdo/js/scripts.js on lines 1046..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 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

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

                                              if ($('#max-reportcount').val() == 'reportcount:<=:21') { 
                                                  $('form#filterform').find('#max-reportcount').remove();
                                              } // if
                                          Severity: Minor
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 40 mins to fix
                                          templates/we1rdo/js/scripts.js on lines 1038..1040

                                          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 2 locations. Consider refactoring.
                                          Open

                                                      if ($titleElm) {
                                                          $titleElm.text(msg.title);
                                                      } else {
                                                          htmlData += '<optgroup label="' + msg.title + '">';
                                                      } // else
                                          Severity: Minor
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 35 mins to fix
                                          templates/we1rdo/js/scripts.js on lines 1204..1208

                                          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 2 locations. Consider refactoring.
                                          Open

                                                      if ($titleElm) {
                                                          $titleElm.text(msg.title);
                                                      } else {
                                                          htmlData += '<optgroup label="' + msg.title + '">';
                                                      } // else
                                          Severity: Minor
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 35 mins to fix
                                          templates/we1rdo/js/scripts.js on lines 1132..1136

                                          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

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

                                              $document.bind('keydown', 'j', function(){if(!($("div#overlay").hasClass("loading"))) {spotNav('next')}});
                                          Severity: Minor
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 35 mins to fix
                                          templates/we1rdo/js/scripts.js on lines 424..424

                                          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 46.

                                          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

                                              $document.bind('keydown', 'k', function(){if(!($("div#overlay").hasClass("loading"))) {spotNav('prev')}});
                                          Severity: Minor
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 35 mins to fix
                                          templates/we1rdo/js/scripts.js on lines 425..425

                                          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 46.

                                          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

                                                      $("span.commentcount").html('# '+$("#commentslist").children().not(".addComment").size());
                                          Severity: Minor
                                          Found in templates/we1rdo/js/scripts.js and 1 other location - About 30 mins to fix
                                          js/posting/posting.js on lines 38..38

                                          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