From e88d8c2d534c2587e5acd1c185ed9cf6b7d27b6c Mon Sep 17 00:00:00 2001 From: Josue Kouka Date: Thu, 15 Dec 2016 15:36:55 +0100 Subject: [PATCH] remove useless console.log statements (#14324) --- mandayejs/mandaye/static/force.redirect.js | 12 ++++-------- mandayejs/mandaye/static/single.logout.js | 1 - 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/mandayejs/mandaye/static/force.redirect.js b/mandayejs/mandaye/static/force.redirect.js index 66823ca..6ab869e 100644 --- a/mandayejs/mandaye/static/force.redirect.js +++ b/mandayejs/mandaye/static/force.redirect.js @@ -1,5 +1,5 @@ /* This scripts force the redirection to the homepage - * if current pathname == and the current user is + * if current pathname == and the current user is * already associated and currently connected */ @@ -19,12 +19,10 @@ $(function(){ function conditionsOk(){ if (!urlExists('#manndaye-logon-url', '/_mandaye/accounts/mellon/logout')){ - console.log('user not connected'); return false; } if(!urlExists('#mandaye-association-url', '/_mandaye/dissociate')){ - console.log('user not associated'); return false; } @@ -32,22 +30,20 @@ $(function(){ */ if(mandaye_redirect_url.length){ if (window.location.href.indexOf(mandaye_redirect_url) < 1){ - console.log('not on login page'); return false; } - + } /* Forces mandayejs authentication through a specific locator */ if(mandaye_redirect_locator.length){ if (!$(mandaye_redirect_locator).length){ - console.log('locator not found'); - return false; + return false; } } return true; } - + if(conditionsOk()) window.location = mandaye_post_login ; diff --git a/mandayejs/mandaye/static/single.logout.js b/mandayejs/mandaye/static/single.logout.js index ae8de67..9c02f6d 100644 --- a/mandayejs/mandaye/static/single.logout.js +++ b/mandayejs/mandaye/static/single.logout.js @@ -2,7 +2,6 @@ $(function(){ if (typeof(mandaye_logout_locator) === 'undefined') return false; $(mandaye_logout_locator).click(function(){ - console.log("launching slo"); window.location = '/_mandaye/logout/'; return false; }); -- 2.10.2