]> git.example.dev Git - binbsis50.git/commitdiff
removed trailing spaces
authorLuigi Pinca <luigipinca@gmail.com>
Sun, 25 May 2014 11:32:21 +0000 (13:32 +0200)
committerLuigi Pinca <luigipinca@gmail.com>
Sun, 25 May 2014 11:32:21 +0000 (13:32 +0200)
README.md
lib/captcha.js
package.json
routes/user.js
views/home.jade
views/layout.jade
views/login.jade
views/user.jade

index 47c6552c8b32d6a9848c9eada4999706508555b8..b585595c4ac8e8193839139d1a005df7847a5918 100644 (file)
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@ You also need `UglifyJS` installed globally:
 ### Install binb
 
 Once you have redis server up and running type:
-    
+
     $ make install
 
 Then run `$ npm start` or `$ node app.js` to start the app.
index 4b33747ba4de4bc6cfd4dfbae18e43b2905d3f00..01d93ab85555e4167443dedd639e37adda4b248a 100644 (file)
@@ -23,7 +23,7 @@ Captcha.prototype.initialize = function() {
   while (this.code.length < 4) {
     this.code += characters[Math.floor(Math.random() * characters.length)];
   }
-  
+
   var ctx = this.canvas.getContext('2d');
 
   ctx.fillStyle = '#DDDDDD';
index 93543da83e4431c766ef0b48e9575b8076f5649f..d6e35d2ae62450bddbfef1abef65fd60e2a4695b 100644 (file)
@@ -34,5 +34,5 @@
     "start": "node app.js"
   },
   "subdomain": "binb",
-  "version": "0.4.8-4"
+  "version": "0.4.8-5"
 }
index c7c033a4477c7c87fbfa907d51f631e34c27f02c..c9c5e9ae90f4557ca2a6247aca6ee991bdebc2eb 100644 (file)
@@ -69,13 +69,13 @@ exports.sliceLeaderboard = function(req, res, next) {
 /**
  * Change password middlewares.
  */
+
 exports.validateChangePasswd = function(req, res, next) {
   if (!req.session.user || req.body.oldpassword === undefined ||
     req.body.newpassword === undefined) {
     return res.send(400);
   }
-  
+
   var errors = {};
 
   if (req.body.oldpassword.trim() === '') {
@@ -90,12 +90,12 @@ exports.validateChangePasswd = function(req, res, next) {
   else if(req.body.newpassword === req.body.oldpassword) {
     errors.newpassword = "can't be changed to the old one";
   }
-  
+
   if (errors.oldpassword || errors.newpassword) {
     req.session.errors = errors;
     return res.redirect(req.url);
   }
-  
+
   next();
 };
 
@@ -156,7 +156,7 @@ exports.validateLogin = function(req, res, next) {
   if (req.body.password.trim() === '') {
     errors.password = "can't be empty";
   }
-  
+
   req.session.oldvalues = {username: req.body.username};
   if (errors.username || errors.password) {
     req.session.errors = errors;
@@ -246,18 +246,18 @@ exports.validateSignUp = function(req, res, next) {
   if (req.body.captcha !== req.session.captchacode) {
     errors.captcha = 'no match';
   }
-  
+
   // Save old values to repopulate the fields in case of future errors
   req.session.oldvalues = {
     username: req.body.username,
     email: req.body.email
   };
-  
+
   if (errors.username || errors.email || errors.password || errors.captcha) {
     req.session.errors = errors;
     return res.redirect(req.url);
   }
-  
+
   next();
 };
 
@@ -326,28 +326,28 @@ exports.createAccount = function(req, res, next) {
 /**
  * Recover password middlewares.
  */
+
 exports.validateRecoverPasswd = function(req, res, next) {
   if (req.body.email === undefined || req.body.captcha === undefined) {
     return res.send(400);
   }
 
   var errors = {};
-  
+
   if (!utils.isEmail(req.body.email)) {
     errors.email = 'is not an email address';
   }
   if (req.body.captcha !== req.session.captchacode) {
     errors.captcha = 'no match';
   }
-  
+
   req.session.oldvalues = {email: req.body.email};
-  
+
   if (errors.email || errors.captcha) {
     req.session.errors = errors;
     return res.redirect(req.url);
   }
-  
+
   next();
 };
 
@@ -393,9 +393,9 @@ exports.resetPasswd = function(req, res, next) {
   if (req.body.password === undefined) {
     return res.send(400);
   }
-  
+
   var errors = {};
-  
+
   // Validate new password
   if (req.body.password.trim() === '') {
     errors.password = "can't be empty";
@@ -407,12 +407,12 @@ exports.resetPasswd = function(req, res, next) {
   if (!req.query.token) {
     errors.alert = 'Missing token.';
   }
-  
+
   if (errors.password || errors.alert) {
     req.session.errors = errors;
     return res.redirect(req.url);
   }
-  
+
   var key = 'token:' + req.query.token;
   db.get([key], function(err, user) {
     if (err) {
index 9d77d6fa1a9023f4ca76aa88bc9087ce70c3c88b..cf889d85d9599aabd3f155f49c4d3d96590e1018 100644 (file)
@@ -55,6 +55,6 @@ block sections
                   span(id=item)
                   |  Players
 
-append scripts    
+append scripts
   script(src="/static/js/primus.min.js")
   script(src="/static/js/home.min.js")
index a4db376a74c8aa6d89aa580438cb3dc3df55f1de..1eacdc0e5094f765fe7c8a87dd79642e2ed08dc6 100644 (file)
@@ -37,11 +37,11 @@ html
       footer
         #footer-inner
           #copy &copy; 2012-2014 Luigi Pinca
-          iframe#facebook-button(allowTransparency="true", frameborder="0", scrolling="no", 
+          iframe#facebook-button(allowTransparency="true", frameborder="0", scrolling="no",
             src!="//www.facebook.com/plugins/like.php?action=like&amp;colorscheme=light&amp;href=http%3A%2F%2Fbinb.nodejitsu.com&amp;layout=button_count&amp;locale=en_US&amp;share=true&amp;show_faces=false")
           iframe#twitter-button(allowtransparency="true", frameborder="0", scrolling="no",
             src="//platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fbinb.nodejitsu.com")
-          iframe#github-button(allowtransparency="true", frameborder="0", scrolling="0", 
+          iframe#github-button(allowtransparency="true", frameborder="0", scrolling="0",
             src="http://ghbtns.com/github-btn.html?user=lpinca&repo=binb&type=watch&count=true")
           span.footer-info . Optimized for Google Chrome.
           a#nodejitsu-logo.icons(target="_blank", href="http://nodejitsu.com/")
@@ -55,7 +55,7 @@ html
       (function() {
         var uv = document.createElement('script');
         uv.type = 'text/javascript'; uv.async = true;
-        uv.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 
+        uv.src = ('https:' == document.location.protocol ? 'https://' : 'http://') +
           'widget.uservoice.com/LSMjFAQRifhD6BjOG2KWw.js';
         var s = document.getElementsByTagName('script')[0];
         s.parentNode.insertBefore(uv, s);
index dfe1d122f4f0e0a2c6e409b0cf7fb90280d3124a..39e7ef1be10052a1a9978a7e1e9f339730f30016 100644 (file)
@@ -2,7 +2,7 @@ extends layout
 
 block title
   title binb :: login
-    
+
 block nav
   ul.nav.pull-right
     li
index 2fabd83b9b4e6c1057b5825a2886f6fc3237686b..5bee7f01621d8e79d2a9d3501c72514410677eca 100644 (file)
@@ -2,7 +2,7 @@ extends layout
 
 block title
   title binb :: #{username} info
-  
+
 block brand
   a.brand(href="#")
     .icons.logo #{slogan}