From b08c4c109d8566c581ab692148fe110ca5c1e460 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sat, 7 Dec 2013 07:51:35 +0000 Subject: [PATCH] Fix JSHint errors and remove unreachable code. props adamsilverstein. see #25963. git-svn-id: https://develop.svn.wordpress.org/trunk@26778 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/theme.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/wp-admin/js/theme.js b/src/wp-admin/js/theme.js index d3777b3e0c..4d4a6b256f 100644 --- a/src/wp-admin/js/theme.js +++ b/src/wp-admin/js/theme.js @@ -339,7 +339,7 @@ themes.view.Details = wp.Backbone.View.extend({ // Checks if the theme screenshot is the old 300px width version // and adds a corresponding class if it's true screenshotCheck: function( el ) { - var screenshot, image, width; + var screenshot, image; screenshot = el.find( '.screenshot img' ); image = new Image(); @@ -347,7 +347,7 @@ themes.view.Details = wp.Backbone.View.extend({ // Width check if ( image.width && image.width <= 300 ) { - el.addClass( 'small-screenshot' ); + el.addClass( 'small-screenshot' ); } } }); @@ -634,12 +634,6 @@ themes.routes = Backbone.Router.extend({ baseUrl: function( url ) { return themes.data.settings.root + url; - }, - - // Set the search input value based on url - search: function( query ) { - $( '.theme-search' ).val( query ); - self.themes.doSearch( query ); } }); @@ -682,7 +676,6 @@ themes.Run = { }, routes: function() { - var self = this; // Bind to our global thx object // so that the object is available to sub-views themes.router = new themes.routes();