From a38011b4a53b69bb381fb908cbda30d99a4aa11b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rouven=20We=C3=9Fling?= Date: Tue, 2 Jun 2015 22:53:41 +0200 Subject: [PATCH] Remove some unused JS. --- source/javascripts/app/_lang.js | 3 +-- source/javascripts/app/_search.js | 11 ++++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/source/javascripts/app/_lang.js b/source/javascripts/app/_lang.js index 2683ef3..c3b48ed 100644 --- a/source/javascripts/app/_lang.js +++ b/source/javascripts/app/_lang.js @@ -54,7 +54,6 @@ under the License. } function setupLanguages(l) { - var currentLanguage = l[0]; var defaultLanguage = localStorage.getItem("language"); languages = l; @@ -81,7 +80,7 @@ under the License. activateLanguage(language); return false; }); - window.onpopstate = function(event) { + window.onpopstate = function() { activateLanguage(window.location.search.substr(1)); }; }); diff --git a/source/javascripts/app/_search.js b/source/javascripts/app/_search.js index 550b1a3..91f38a0 100644 --- a/source/javascripts/app/_search.js +++ b/source/javascripts/app/_search.js @@ -1,10 +1,9 @@ //= require ../lib/_lunr //= require ../lib/_jquery.highlight -(function (global) { +(function () { 'use strict'; - var $global = $(global); - var content, darkBox, searchResults; + var content, searchResults; var highlightOpts = { element: 'span', className: 'search-highlight' }; var index = new lunr.Index(); @@ -31,7 +30,6 @@ function bind() { content = $('.content'); - darkBox = $('.dark-box'); searchResults = $('.search-results'); $('#input-search').on('keyup', search); @@ -58,7 +56,7 @@ highlight.call(this); } else { searchResults.html('
  • '); - $('.search-results li').text('No Results Found for "' + this.value + '"'); + $('.search-results li').text('No Results Found for "' + this.value + '"'); } } else { unhighlight(); @@ -73,5 +71,4 @@ function unhighlight() { content.unhighlight(highlightOpts); } - -})(window); +})();