From 6299531f4c8f7daa1b4afab45d0439f635b03982 Mon Sep 17 00:00:00 2001 From: Bruno Wagner Date: Tue, 7 Oct 2014 15:01:42 +0200 Subject: Fixed jshint errors --- web-ui/app/js/style_guide/main.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'web-ui/app/js/style_guide/main.js') diff --git a/web-ui/app/js/style_guide/main.js b/web-ui/app/js/style_guide/main.js index 8dc2b949..170d1187 100644 --- a/web-ui/app/js/style_guide/main.js +++ b/web-ui/app/js/style_guide/main.js @@ -14,13 +14,15 @@ * You should have received a copy of the GNU Affero General Public License * along with Pixelated. If not, see . */ +'use strict'; + $(document).ready(function(){ $('a[href*=#]').click(function() { - if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') - && location.hostname == this.hostname) { + if (location.pathname.replace(/^\//,'') === this.pathname.replace(/^\//,'') && + location.hostname === this.hostname) { var $target = $(this.hash); - $target = $target.length && $target - || $('[name=' + this.hash.slice(1) +']'); + $target = $target.length && $target || + $('[name=' + this.hash.slice(1) +']'); if ($target.length) { var targetOffset = $target.offset().top; $('html,body') -- cgit v1.2.3