Showing 21 of 50 total issues
Function exports
has 208 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
require('time-grunt')(grunt);
File webdav_fs.js
has 496 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"use strict";
(function() {
// Constructor
File webdav_client.js
has 441 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"use strict";
(function() {
// Constructor
Function assignEventHandlers
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var assignEventHandlers = function() {
chrome.fileSystemProvider.onUnmountRequested.addListener(
function(options, successCallback, errorCallback) { // Unmount immediately
var fileSystemId = options.fileSystemId;
var webDavClient = getWebDavClient.call(this, fileSystemId);
Consider simplifying this complex logical expression. Open
Open
if (window.FormData &&
((options.dataType && (options.dataType === 'binary')) ||
(options.data && ((window.ArrayBuffer && options.data instanceof ArrayBuffer) ||
(window.Blob && options.data instanceof Blob))))) {
return {
Function get
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
MetadataCache.prototype.get = function(entryPath) {
if (entryPath === "/") {
return {
needFetch: true,
exists: true
Function appendCredentialToScreen
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var appendCredentialToScreen = function(credential) {
var credentials = document.querySelector("#credentials");
var div = document.createElement("div");
div.setAttribute("horizontal", "true");
div.setAttribute("layout", "true");
Function closeFile
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
WebDavClient.prototype.closeFile = function(options) {
var writeRequest = this.writeRequestMap[options.openRequestId];
if (writeRequest && writeRequest.mode === "WRITE") {
var localFileName = writeRequest.localFileName;
var errorHandler = function(error) {
Function onClickedBtnMount
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var onClickedBtnMount = function(evt) {
console.log("onClickedBtnMount");
var btnMount = document.querySelector("#btnMount");
evt.preventDefault();
btnMount.setAttribute("disabled", "true");
Function truncate
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
WebDavClient.prototype.truncate = function(options) {
var headers = createHeaders.call(this, {});
$.ajax({
type: "GET",
url: this.getUrl() + encodePath(options.path),
Function initializeJQueryAjaxBinaryHandler
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var initializeJQueryAjaxBinaryHandler = function() {
$.ajaxTransport("+binary", function(options, originalOptions, jqXHR){
if (window.FormData &&
((options.dataType && (options.dataType === 'binary')) ||
(options.data && ((window.ArrayBuffer && options.data instanceof ArrayBuffer) ||
Function onClickedBtnKeep
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var onClickedBtnKeep = function(evt) {
console.log("onClickedBtnKeep");
chrome.storage.local.get("settings", function(items) {
var settings = items.settings || {};
var keepPassword = settings.keepPassword || "keepPasswordNo";
Function doMount
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var doMount = function(request, sendResponse) {
webdav_fs_.checkAlreadyMounted(request.url, request.username, function(exists) {
if (exists) {
sendResponse({
type: "error",
Function readDirectory
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
WebDavClient.prototype.readDirectory = function(options) {
var headers = createHeaders.call(this, {
"Content-Type": "text/xml; charset=UTF-8",
"Depth": 1
});
Function onReadFileRequested
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
WebDavFS.prototype.onReadFileRequested = function(options, successCallback, errorCallback) {
console.log("onReadFileRequested - start");
console.log(options);
var filePath = getOpenedFiles.call(this, options.fileSystemId)[options.openRequestId];
var webDavClient = getWebDavClient.call(this, options.fileSystemId);
Function setMessageResources
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var setMessageResources = function() {
var selector = "data-message";
var elements = document.querySelectorAll("[" + selector + "]");
for (var i = 0; i < elements.length; i++) {
Function assignEventHandlers
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var assignEventHandlers = function() {
var btnMount = document.querySelector("#btnMount");
btnMount.addEventListener("click", function(e) {
onClickedBtnMount(e);
});
Function openFile
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
WebDavClient.prototype.openFile = function(filePath, requestId, mode, successCallback, errorCallback) {
Function doMount
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
var doMount = function(url, authType, username, password, callback) {
Function WebDavClient
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
var WebDavClient = function(webDavFS, url, authType, username, password) {