Showing 292 of 636 total issues
Function readManga
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
function readManga(request, callback, doSave) {
var mangaExist = isInMangaList(request.url);
if (mangaExist == null) {
var newManga = new MangaElt(request);
var simMgs = getSimilarMangaTitles(newManga);
- Read upRead up
- Create a ticketCreate a ticket
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 refreshAllLasts
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
function refreshAllLasts(refreshTimer, perform) {
try {
if (perform == undefined || perform == true) {
console.log("Refreshing chapters at " + new Date());
localStorage["lastChaptersUpdate"] = new Date().getTime();
- Read upRead up
- Create a ticketCreate a ticket
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 getModifsText
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
function getModifsText(mg) {
var lstres = [];
if (mg.change == "new") {
lstres[lstres.length] = {button: "img/add.png", text: "This manga will be added in your list."};
} else if (mg.change == "delete") {
- Read upRead up
- Create a ticketCreate a ticket
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 initPage
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
function initPage() {
//console.log("initPage");
if (getMirrorScript().isCurrentPageAChapterPage(document, window.location.href)) {
setKeys();
//console.log("found mirror for current page");
- Create a ticketCreate a ticket
Function filter
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
function filter() {
"use strict";
var isOk = true,
tmpLst = [],
found = false,
- Read upRead up
- Create a ticketCreate a ticket
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 bindCategories
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
function bindCategories() {
"use strict";
$(".category.include").each(function (ind) {
$(this).attr("title", "All mangas in category " + $(this).text().trim() + " are included in the list.");
});
- Create a ticketCreate a ticket
Function createBar
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createBar(barVis) {
var div = $("<div id='AMRBar'></div>");
var divIn = $("<div id='AMRBarIn'></div>");
var img = $("<img src='" + chrome.extension.getURL("img/icon-32.png") + "' width='20px;'/>");
- Create a ticketCreate a ticket
Function createMangaEntryList
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
function createMangaEntryList(mangas, where) {
"use strict";
var isRead = false;
var isUpdate = true;
if (mangas.length) {
- Read upRead up
- Create a ticketCreate a ticket
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 moveMangaElement
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
function moveMangaElement(elt) {
"use strict";
var eltAfter = null;
var toMove;
var isplaceOk = true;
- Read upRead up
- Create a ticketCreate a ticket
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 activateMirror
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
function activateMirror(mirrorName) {
var states = localStorage["mirrorStates"];
var lstTmp = JSON.parse(states);
if (lstTmp.length > 0) {
for (var j = 0; j < lstTmp.length; j++) {
- Read upRead up
- Create a ticketCreate a ticket
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 initMirrorState
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
function initMirrorState() {
var states = localStorage["mirrorStates"];
if (states == undefined || states == null || states == "null") {
instantiateMirrors();
} else {
- Read upRead up
- Create a ticketCreate a ticket
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 removeMangaParent
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
function removeMangaParent(elt) {
"use strict";
if (isInGroup(elt)) {
if (nbOfGroup(elt) === 1) {
elt.closest(".manga").toggle("blind", {}, 500, function () {
- Read upRead up
- Create a ticketCreate a ticket
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 loadSelectors
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
function loadSelectors() {
var selAll = $("<img src='" + chrome.extension.getURL("img/select_all.png") + "' title='Select all'/>");
var selNone = $("<img src='" + chrome.extension.getURL("img/select_none.png") + "' title='Select none'/>");
var selUsed = $("<img src='" + chrome.extension.getURL("img/bookmark.png") + "' title='Select all on which i have at least one manga in my list'/>");
selAll.click(function () {
- Create a ticketCreate a ticket
Function renderManga
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
function renderManga(lstBms) {
"use strict";
var divChaps,
divScans,
parity = 0,
- Create a ticketCreate a ticket
Function refreshLast
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.refreshLast = function (doSave, callback) {
if (this.update === 1) {
//Refresh the last existing chapter of this manga
if (!doSave) {
doSave = true;
- Create a ticketCreate a ticket
Function dragCatManga
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function dragCatManga(mg, _cat) {
"use strict";
if (isInGroup(mg)) {
var obj = {
action : "addCategories",
- Create a ticketCreate a ticket
Function nodeToXML
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
function nodeToXML(node, indentation, out) {
"use strict";
var item,
value,
i;
- Read upRead up
- Create a ticketCreate a ticket
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 nodeToXML
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
function nodeToXML(node, indentation, out) {
"use strict";
var value,
item,
i;
- Read upRead up
- Create a ticketCreate a ticket
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 updateWebsitesFromRepository
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
function updateWebsitesFromRepository(callback) {
"use strict";
$.ajax({
type: 'GET',
url: amrc_repository + "websites.json",
- Create a ticketCreate a ticket
File mgUtil.js
has 295 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
This file is part of All Mangas Reader.
All Mangas Reader is free software: you can redistribute it and/or modify
- Create a ticketCreate a ticket