Showing 292 of 636 total issues
Function isMangaDisplayable
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
function isMangaDisplayable(mg) {
"use strict";
var isInclude = false;
var isExclude = false;
var isNew = $(mg).hasClass("new");
- Create a ticketCreate a ticket
Function importMangas
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function importMangas(mangas, merge) {
var textOut = "";
if (!merge) {
textOut += translate("background_impexp_del") + '\n';
var deleteAr = [];
- 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 consult
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.consult = function (obj, fromSite) {
if (fromSite === undefined) {
fromSite = false;
}
var posOld = -1,
- Create a ticketCreate a ticket
Function displayList
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
function displayList(lst, updtSrv, where, noinfo) {
if (where == undefined) {
where = $("#mangalist");
}
if (noinfo == undefined) {
- Create a ticketCreate a ticket
Function desactivateMirror
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function desactivateMirror(mirrorName) {
var nb = 0;
for (var i = 0; i < mangaList.length; i++) {
if (mangaList[i].mirror == mirrorName) {
nb++;
- 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 testListMgs
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
function testListMgs() {
addResult("listmgs", "L", "Test if list of mangas can be loaded for this mirror.", $("<span>Loading...</span>"), "");
getMangaMirror($("#mirrorList").val()).getMangaList($("#searchBoxInput").val(), function(mirName, lst) {
var res = $("<div></div>");
var isOk = true;
- Create a ticketCreate a ticket
Function testInfos
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
function testInfos(div, callback) {
addResult("testinfos", "L", "Test if the manga informations can be retrieved from loaded page.", $("<span>Loading...</span>"), "");
getMangaMirror($("#mirrorList").val()).getInformationsFromCurrentPage($(div), $("#lstChaps").val(), function(res) {
var result = $("<div></div>");
var isOk = true;
- Create a ticketCreate a ticket
Function restore_options
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
function restore_options() {
"use strict";
var response = chrome.extension.getBackgroundPage().getParameters(),
colPicks;
- Create a ticketCreate a ticket
Function loadMangas
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
function loadMangas() {
"use strict";
var main = $("#main"),
mangasGrps = [],
ancShName,
- 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 removeCategory
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
function removeCategory(request, callback) {
if (mangaList.length > 0) {
for (var i = 0; i < mangaList.length; i++) {
if (mangaList[i].cats.length > 0) {
var toRem = [];
- 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 importBookmarks
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
function importBookmarks(bms, merge) {
var textOut = "";
if (!merge) {
textOut += translate("background_impexp_del_bm") + '\n';
var deleteAr = [];
- 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 renderManga
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
function renderManga(lstBms) {
"use strict";
var divChaps,
divScans,
parity = 0,
- 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 testChapters
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
function testChapters() {
resetAfter("listmgs");
addResult("listchaps", "L", "Test if list of chapters can be loaded for the selected manga.", $("<span>Loading...</span>"), "");
getMangaMirror($("#mirrorList").val()).getListChaps($("#lstMangas").val(), $("#lstMangas option:selected").text(), null, function(lst, obj) {
- Create a ticketCreate a ticket
Function onErrorImage
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
function onErrorImage() {
$(this).css("margin-bottom", "50px");
$(this).css("margin-right", "10px");
if (this.naturalWidth === 0) {
//Here, number of tries before considering image can not be loaded
- Create a ticketCreate a ticket
Function prettyDate
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function prettyDate(time) {
"use strict";
var diff = ((new Date().getTime() - time) / 1000);
var day_diff = Math.floor(diff / 86400);
if (isNaN(day_diff) || day_diff < 0) {
- 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 getBookmark
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function getBookmark(obj) {
if (bookmarks.length > 0) {
for (var j = 0; j < bookmarks.length; j++) {
if (obj.mirror == bookmarks[j].mirror && obj.url == bookmarks[j].url && obj.chapUrl == bookmarks[j].chapUrl && obj.type == bookmarks[j].type) {
if (obj.type == "chapter") {
- 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 waitForEndLoad
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function waitForEndLoad() {
if (nbToLoad != ancNbToLoad) {
ancNbToLoad = nbToLoad;
tempMirrorListAll.sort(function (a, b) {
var aname = formatMgName(a.name);
- 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 loadMangas
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
function loadMangas() {
"use strict";
var main = $("#main"),
mangasGrps = [],
ancShName,
- Create a ticketCreate a ticket
Function traverse
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.traverse = function (_34) {
var _35 = this,
_36 = [],
_37, _38, _39 = this.folder,
_3a;
- Create a ticketCreate a ticket
Function createScan
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createScan(obj, where) {
"use strict";
var divImg = $("<div class='scanDiv'></div>");
divImg.data("mirror", obj.mirror);
divImg.data("url", obj.url);
- Create a ticketCreate a ticket