From bbad92a161c7471ef011f3cb413999889903cb68 Mon Sep 17 00:00:00 2001 From: rugk Date: Tue, 19 Jul 2016 14:13:52 +0200 Subject: [PATCH] Minor JS code improvments --- .eslintrc | 5 ++++- js/privatebin.js | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.eslintrc b/.eslintrc index 9faa3750..97437c73 100644 --- a/.eslintrc +++ b/.eslintrc @@ -9,6 +9,9 @@ env: jquery: true node: true +globals: + sjcl: false + # http://eslint.org/docs/rules/ rules: # Possible Errors @@ -52,7 +55,7 @@ rules: dot-notation: 0 eqeqeq: 2 guard-for-in: 2 - no-alert: 2 + no-alert: 0 no-caller: 2 no-case-declarations: 2 no-div-regex: 2 diff --git a/js/privatebin.js b/js/privatebin.js index 56e8292c..abc2e47e 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -72,7 +72,7 @@ $(function() { hashToParameterString: function(associativeArray) { var parameterString = ''; - for (key in associativeArray) + for (var key in associativeArray) { if(parameterString === '') { @@ -1462,4 +1462,3 @@ $(function() { */ i18n.loadTranslations($.proxy(privatebin.init, privatebin)); }); -