Showing 137 of 237 total issues
File common.js
has 1211 lines of code (exceeds 250 allowed). Consider refactoring. Open
function has_attr(id){
return function(target){
return this.getAttribute(id)
}
}
File main.js
has 1025 lines of code (exceeds 250 allowed). Consider refactoring. Open
window.onload = init;
window.onresize = function(){LDR.invoke_hook('WINDOW_RESIZE')};
var app = LDR.Application.getInstance();
File commands.js
has 984 lines of code (exceeds 250 allowed). Consider refactoring. Open
function touch(id, state){
if(app.config.touch_when == state){
touch_all(id)
}
}
File addon.js
has 910 lines of code (exceeds 250 allowed). Consider refactoring. Open
// print_ads
LDR.register_hook('BEFORE_PRINTFEED', function(feed){
print_ads(feed.ads);
});
Control
has 76 functions (exceeds 20 allowed). Consider refactoring. Open
var Control = {
pin: function(){
var item = get_active_item(true);
if(!item) return;
toggle_pin(item.item_id);
File manage.js
has 599 lines of code (exceeds 250 allowed). Consider refactoring. Open
// manage
updater("manage_item", function(){
if(!Manage.Item.loaded){
File subscribe.js
has 476 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* LDR /subscribe/ */
ApiKey = document.querySelector('#ApiKey').dataset.apiKey;
LDR.API.StickyQuery = { ApiKey: ApiKey };
var LDReader = {};
File share.js
has 354 lines of code (exceeds 250 allowed). Consider refactoring. Open
window.onload = init;
LDR.API.StickyQuery = { ApiKey: ApiKey };
var State = {};
State.offset = 0;
File subscriber.js
has 343 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*************************************************
購読リストの整形。Subsの絞込みや、整形
*************************************************/
Subscribe = {};
// Template
Function print_feed
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
function print_feed(feed){
LDR.invoke_hook('BEFORE_PRINTFEED', feed);
var subscribe_id = feed.subscribe_id;
app.state.last_feed = feed;
Function print_feed
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
function print_feed(feed){
LDR.invoke_hook('BEFORE_PRINTFEED', feed);
var subscribe_id = feed.subscribe_id;
app.state.last_feed = feed;
- 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 update
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
update: function(reload_flag){
if(!LDR.VARS.USE_PARTIAL_LOAD){
return this._update.apply(this, arguments);
}
var self = 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
Method subs
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def subs
limit = (params[:limit] || 0).to_i
from_id = (params[:from_id] || 0).to_i
items = []
subscriptions = @member.subscriptions
- 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 queryCSS
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
function queryCSS(el,rule){
var tokens = rule.split(' ');
var checkFunctions = [];
function cmp(a,b){
return (""+a).toLowerCase() == (""+b).toLowerCase();
Function update
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
update: function(reload_flag){
if(!LDR.VARS.USE_PARTIAL_LOAD){
return this._update.apply(this, arguments);
}
var self = this;
Function toRegExp
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
toRegExp: function(text){
text = text || this.source;
var nstr = [];
var temp,kana,hira,kata;
var skip = 0;
- 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 get_active_item
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
function get_active_item(detail){
// return 1;
var sc = _$("right_container").scrollTop;
var divs = _$("right_body").getElementsByTagName("h2");
// for Opera9 beta
- 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
`` has 27 functions (exceeds 20 allowed). Consider refactoring. Open
ListView.extend({
element_id: "listview_items",
element_class: "listview",
get_item_by_id: function(id){
if(this.item_index[id]){
Function kc2char
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
HotKey.kc2char = function(kc){
var between = function(a,b){
return a <= kc && kc <= b
}
var _32_40 = "space pageup pagedown end home left up right down".split(" ");
- 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 setup_hook
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
LDR.setup_hook = function(){
var guide_fix = function(){
if(!hasClass("right_container","mode-guide")) return;
if(browser.isIE){
if(!_$("guiderankbody")) return;