From 24511748701663b8929e3bea1788372f4445a350 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 27 Apr 2018 18:04:21 +0200 Subject: [PATCH] Lint compliance --- www/common/common-hash.js | 2 +- www/common/common-messaging.js | 2 +- www/common/common-thumbnail.js | 2 +- www/common/outer/async-store.js | 2 +- www/common/toolbar3.js | 1 - www/file/inner.js | 1 - 6 files changed, 4 insertions(+), 6 deletions(-) diff --git a/www/common/common-hash.js b/www/common/common-hash.js index 95b80e989..5ba9ec5b3 100644 --- a/www/common/common-hash.js +++ b/www/common/common-hash.js @@ -243,7 +243,7 @@ Version 1 return ret; }; - var getRelativeHref = Hash.getRelativeHref = function (href) { + Hash.getRelativeHref = function (href) { if (!href) { return; } if (href.indexOf('#') === -1) { return; } var parsed = parsePadUrl(href); diff --git a/www/common/common-messaging.js b/www/common/common-messaging.js index e98cfb84f..b5a12da0b 100644 --- a/www/common/common-messaging.js +++ b/www/common/common-messaging.js @@ -99,7 +99,7 @@ define([ try { var parsed = Hash.parsePadUrl(window.location.href); if (!parsed.hashData) { return; } - var chan = Hash.hrefToHexChannelId(data.href); + var chan = Hash.hrefToHexChannelId(window.location.href); // Decrypt var keyStr = parsed.hashData.key; var cryptor = Crypto.createEditCryptor(keyStr); diff --git a/www/common/common-thumbnail.js b/www/common/common-thumbnail.js index 2495b2aac..ab6d3e6d4 100644 --- a/www/common/common-thumbnail.js +++ b/www/common/common-thumbnail.js @@ -246,7 +246,7 @@ define([ Thumb.setPadThumbnail = function (common, href, channel, b64, cb) { cb = cb || function () {}; var parsed = Hash.parsePadUrl(href); - var channel = channel || common.getMetadataMgr().getPrivateData().channel; + channel = channel || common.getMetadataMgr().getPrivateData().channel; var k = getKey(parsed.type, channel); common.setThumbnail(k, b64, cb); }; diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index fb520918d..cbac4557d 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -542,7 +542,7 @@ define([ channel: channel, title: data.driveReadmeTitle, }; - addPad(fileData, cb); + Store.addPad(fileData, cb); }); }); }; diff --git a/www/common/toolbar3.js b/www/common/toolbar3.js index 1cecffe0c..b351002fc 100644 --- a/www/common/toolbar3.js +++ b/www/common/toolbar3.js @@ -577,7 +577,6 @@ define([ var pd = config.metadataMgr.getPrivateData(); var o = pd.origin; var hashes = pd.availableHashes; - var url = pd.origin + pd.pathname + '#' + (hashes.editHash || hashes.viewHash); var cid = pd.channel; Common.sendAnonRpcMsg('IS_CHANNEL_PINNED', cid, function (x) { if (x.error || !Array.isArray(x.response)) { return void console.log(x); } diff --git a/www/file/inner.js b/www/file/inner.js index 44a51d5ba..8e00d9096 100644 --- a/www/file/inner.js +++ b/www/file/inner.js @@ -231,7 +231,6 @@ define([ if (typeof(sizeMb) === 'number' && sizeMb < 5) { return void onClick(); } $dlform.find('#cp-app-file-dlfile, #cp-app-file-dlprogress').click(onClick); }; - var href = priv.origin + priv.pathname + priv.filehash; common.getFileSize(hexFileName, function (e, data) { if (e) { return void UI.errorLoadingScreen(e);