瀏覽代碼

Minor JS code improvments

rugk 10 年之前
父節點
當前提交
bbad92a161
共有 2 個文件被更改,包括 5 次插入3 次删除
  1. 4 1
      .eslintrc
  2. 1 2
      js/privatebin.js

+ 4 - 1
.eslintrc

@@ -9,6 +9,9 @@ env:
   jquery: true
   jquery: true
   node: true
   node: true
 
 
+globals:
+  sjcl: false
+
 # http://eslint.org/docs/rules/
 # http://eslint.org/docs/rules/
 rules:
 rules:
   # Possible Errors
   # Possible Errors
@@ -52,7 +55,7 @@ rules:
   dot-notation: 0
   dot-notation: 0
   eqeqeq: 2
   eqeqeq: 2
   guard-for-in: 2
   guard-for-in: 2
-  no-alert: 2
+  no-alert: 0
   no-caller: 2
   no-caller: 2
   no-case-declarations: 2
   no-case-declarations: 2
   no-div-regex: 2
   no-div-regex: 2

+ 1 - 2
js/privatebin.js

@@ -72,7 +72,7 @@ $(function() {
         hashToParameterString: function(associativeArray)
         hashToParameterString: function(associativeArray)
         {
         {
             var parameterString = '';
             var parameterString = '';
-            for (key in associativeArray)
+            for (var key in associativeArray)
             {
             {
                 if(parameterString === '')
                 if(parameterString === '')
                 {
                 {
@@ -1462,4 +1462,3 @@ $(function() {
      */
      */
     i18n.loadTranslations($.proxy(privatebin.init, privatebin));
     i18n.loadTranslations($.proxy(privatebin.init, privatebin));
 });
 });
-