From 0ada6a3d0a3341cce81447e41cfb04998c618d48 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 28 Jul 2016 17:52:26 +0200 Subject: [PATCH] jshint compliance. gotta keep those tests green --- www/assert/pretty/main.js | 1 + www/common/clipboard.js | 5 ++++- www/common/cryptpad-common.js | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/www/assert/pretty/main.js b/www/assert/pretty/main.js index f7424e101..1b8272884 100644 --- a/www/assert/pretty/main.js +++ b/www/assert/pretty/main.js @@ -2,6 +2,7 @@ define([ '/bower_components/hyperjson/hyperjson.js', '/bower_components/jquery/dist/jquery.min.js', ], function (Hyperjson) { + var $ = window.jQuery; var shjson = '["BODY",{"class":"cke_editable cke_editable_themed cke_contents_ltr cke_show_borders","spellcheck":"false"},[["P",{},["This is ",["STRONG",{},["CryptPad"]],", the zero knowledge realtime collaborative editor.",["BR",{},[]],"What you type here is encrypted so only people who have the link can access it.",["BR",{},[]],"Even the server cannot see what you type."]],["P",{},[["SMALL",{},[["I",{},["What you see here, what you hear here, when you leave here, let it stay here"]]]],["BR",{"type":"_moz"},[]]]]]]'; var hjson = JSON.parse(shjson); diff --git a/www/common/clipboard.js b/www/common/clipboard.js index edc5eedb8..5e62f5a37 100644 --- a/www/common/clipboard.js +++ b/www/common/clipboard.js @@ -1,4 +1,7 @@ -define(function () { +define([ + '/bower_components/jquery/dist/jquery.min.js', +], function () { + var $ = window.jQuery; var Clipboard = {}; // copy arbitrary text to the clipboard diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index e87bea71c..ae8b6cdd8 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -79,7 +79,7 @@ define([ var setPadAttribute = common.setPadAttribute = function (attr, value, cb) { Store.set([getHash(), attr].join('.'), value, function (err, data) { cb(err, data); - }) + }); }; var getPadAttribute = common.getPadAttribute = function (attr, cb) { @@ -95,7 +95,7 @@ define([ if (recentPadsStr) { try { recentPads = JSON.parse(recentPadsStr); - } catch (err) { + } catch (E) { // couldn't parse the localStorage? // just overwrite it. }