From caf4f48e31723b4a475ef64e5dbefe63bc03fcb7 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 15 Nov 2013 04:41:51 +0000 Subject: [PATCH] Fix JSHint errors in six files. props mdbitz. fixes ##26011, #26012, #26013, #26014, #26038, #26039. git-svn-id: https://develop.svn.wordpress.org/trunk@26195 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/comment-reply.js | 7 ++--- src/wp-includes/js/customize-base.js | 8 ++--- src/wp-includes/js/tinymce/mark_loaded_src.js | 3 +- src/wp-includes/js/wp-auth-check.js | 11 +++---- src/wp-includes/js/wp-lists.js | 1 + src/wp-includes/js/wp-pointer.js | 29 ++++++++++--------- 6 files changed, 31 insertions(+), 28 deletions(-) diff --git a/src/wp-includes/js/comment-reply.js b/src/wp-includes/js/comment-reply.js index 20154253a4..2f2e3b34e4 100644 --- a/src/wp-includes/js/comment-reply.js +++ b/src/wp-includes/js/comment-reply.js @@ -1,5 +1,4 @@ - -addComment = { +var addComment = { moveForm : function(commId, parentId, respondId, postId) { var t = this, div, comm = t.I(commId), respond = t.I(respondId), cancel = t.I('cancel-comment-reply-link'), parent = t.I('comment_parent'), post = t.I('comment_post_ID'); @@ -34,7 +33,7 @@ addComment = { this.style.display = 'none'; this.onclick = null; return false; - } + }; try { t.I('comment').focus(); } catch(e) {} @@ -45,4 +44,4 @@ addComment = { I : function(e) { return document.getElementById(e); } -} +}; diff --git a/src/wp-includes/js/customize-base.js b/src/wp-includes/js/customize-base.js index 81d37716e6..534cf3cf13 100644 --- a/src/wp-includes/js/customize-base.js +++ b/src/wp-includes/js/customize-base.js @@ -129,14 +129,14 @@ window.wp = window.wp || {}; return this; }, - bind: function( id, callback ) { + bind: function( id ) { this.topics = this.topics || {}; this.topics[ id ] = this.topics[ id ] || $.Callbacks(); this.topics[ id ].add.apply( this.topics[ id ], slice.call( arguments, 1 ) ); return this; }, - unbind: function( id, callback ) { + unbind: function( id ) { if ( this.topics && this.topics[ id ] ) this.topics[ id ].remove.apply( this.topics[ id ], slice.call( arguments, 1 ) ); return this; @@ -209,12 +209,12 @@ window.wp = window.wp || {}; return value; }, - bind: function( callback ) { + bind: function() { this.callbacks.add.apply( this.callbacks, arguments ); return this; }, - unbind: function( callback ) { + unbind: function() { this.callbacks.remove.apply( this.callbacks, arguments ); return this; }, diff --git a/src/wp-includes/js/tinymce/mark_loaded_src.js b/src/wp-includes/js/tinymce/mark_loaded_src.js index 2b53192671..a2d08cd8b2 100644 --- a/src/wp-includes/js/tinymce/mark_loaded_src.js +++ b/src/wp-includes/js/tinymce/mark_loaded_src.js @@ -1,3 +1,4 @@ +/* global tinyMCEPreInit, tinymce */ (function(){ if ( typeof tinyMCEPreInit === 'undefined' ) return; @@ -14,7 +15,7 @@ if ( plugin && plugin.charAt(0) != '-' ) { markDone( baseurl+'/plugins/'+plugin+'/editor_plugin'+suffix+'.js' ); markDone( baseurl+'/plugins/'+plugin+'/langs/'+lang+'.js' ); - markDone( baseurl+'/plugins/'+plugin+'/langs/'+lang+'_dlg.js' ) + markDone( baseurl+'/plugins/'+plugin+'/langs/'+lang+'_dlg.js' ); } }); })(); diff --git a/src/wp-includes/js/wp-auth-check.js b/src/wp-includes/js/wp-auth-check.js index 667143de5d..e0c16ca652 100644 --- a/src/wp-includes/js/wp-auth-check.js +++ b/src/wp-includes/js/wp-auth-check.js @@ -1,6 +1,7 @@ +/* global adminpage */ // Interim login dialog (function($){ - var wrap, check, next; + var wrap, next; function show() { var parent = $('#wp-auth-check'), form = $('#wp-auth-check-form'), noframe = wrap.find('.wp-auth-fallback-expired'), frame, loaded = false; @@ -12,7 +13,7 @@ }); frame = $('