From 3999d50ceafba53694d8e5f23984327f1b744f14 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 15 Nov 2013 06:36:17 +0000 Subject: [PATCH] Residual JSHint fixes in common.js and edit-comments.js. see #25912, #25979. git-svn-id: https://develop.svn.wordpress.org/trunk@26208 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/common.js | 16 +++++++++------- src/wp-admin/js/edit-comments.js | 4 ++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/wp-admin/js/common.js b/src/wp-admin/js/common.js index 6ef92d5761..3406ee0b14 100644 --- a/src/wp-admin/js/common.js +++ b/src/wp-admin/js/common.js @@ -691,13 +691,15 @@ var moby6 = { $( document ).ready( $.proxy( moby6.init, moby6 ) ); // make Windows 8 devices playing along nicely -if ( '-ms-user-select' in document.documentElement.style && navigator.userAgent.match(/IEMobile\/10\.0/) ) { - var msViewportStyle = document.createElement( 'style' ); - msViewportStyle.appendChild( - document.createTextNode( '@-ms-viewport{width:auto!important}' ) - ); - document.getElementsByTagName( 'head' )[0].appendChild( msViewportStyle ); -} +(function(){ + if ( '-ms-user-select' in document.documentElement.style && navigator.userAgent.match(/IEMobile\/10\.0/) ) { + var msViewportStyle = document.createElement( 'style' ); + msViewportStyle.appendChild( + document.createTextNode( '@-ms-viewport{width:auto!important}' ) + ); + document.getElementsByTagName( 'head' )[0].appendChild( msViewportStyle ); + } +})(); // internal use $(document).bind( 'wp_CloseOnEscape', function( e, data ) { diff --git a/src/wp-admin/js/edit-comments.js b/src/wp-admin/js/edit-comments.js index f0533de96d..17de857664 100644 --- a/src/wp-admin/js/edit-comments.js +++ b/src/wp-admin/js/edit-comments.js @@ -1,5 +1,5 @@ -/* global adminCommentsL10n, thousandsSeparator, list_args, QTags, ajaxurl, wpAjax, commentReply */ -var setCommentsList, theList, theExtraList, +/* global adminCommentsL10n, thousandsSeparator, list_args, QTags, ajaxurl, wpAjax */ +var setCommentsList, theList, theExtraList, commentReply, toggleWithKeyboard = false; (function($) {