Lint compliance

This commit is contained in:
yflory 2018-04-27 18:04:21 +02:00
parent 64c85fe548
commit 2451174870
6 changed files with 4 additions and 6 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);
};

View File

@ -542,7 +542,7 @@ define([
channel: channel,
title: data.driveReadmeTitle,
};
addPad(fileData, cb);
Store.addPad(fileData, cb);
});
});
};

View File

@ -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); }

View File

@ -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);