File jquery.frontend.js
has 486 lines of code (exceeds 250 allowed). Consider refactoring. Open
var serverOffsetSec = 0; // This should be computed just once
$(document).on('ready', function () {
ppLib.fixLayout();
ppLib.resizeText('#font_resize_bar a');
Function makeTablesBeautiful
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
makeTablesBeautiful: function (handler) {
handler = $(handler);
$("td", handler).hover(
function (event) {
$(this).parent().children("td").addClass("hovered");
Function makeInterfaceButtonsToWork
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
makeInterfaceButtonsToWork: function () {
$('input[type=submit].button:visible').each(function () { // a.button:visible
var $button = $(this);
- Read upRead up
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 makeInterfaceButtonsToWork
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
makeInterfaceButtonsToWork: function () {
$('input[type=submit].button:visible').each(function () { // a.button:visible
var $button = $(this);
Function resizeText
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
resizeText: function (trigger) {
$('#font_resize_bar a').removeClass('active');
var fSizeCookie = readCookie('fSize');
Function helpBubbles
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
helpBubbles: function (trigger, bubbleContentSrc, bubbleColor) {
// declarations
var hintColorClass;
if (!bubbleContentSrc) {
Function navFilesTree
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
navFilesTree: function (el, trigger) {
/* if item has .active, leave it open */
$('li', el).each(function () {
if ($('ul a', this).hasClass('active')) {
Function navFilesTree
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
navFilesTree: function (el, trigger) {
/* if item has .active, leave it open */
$('li', el).each(function () {
if ($('ul a', this).hasClass('active')) {
- Read upRead up
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 sessionCounter
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
sessionCounter: function (sessionTimeoutUTC, serverOffsetSec) {
var today = new Date();
var todaySecsUTC = Math.floor(today.getTime() / 1000 + (today.getTimezoneOffset() * 60));
- Read upRead up
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"