Clean up variable initialization in setupSkinTabs()

Change-Id: Ic596f1c98162557f33f5ca398d2358e91a3d5cb0
This commit is contained in:
Catrope 2013-05-10 11:29:56 -07:00
parent fa73dbeca5
commit b295dc8d99

View file

@ -759,11 +759,13 @@ ve.init.mw.ViewPageTarget.prototype.tearDownSurface = function () {
* @method
*/
ve.init.mw.ViewPageTarget.prototype.setupSkinTabs = function () {
var action, pTabsId, $caSource, $caEdit, $caEditLink, caVeEdit, caVeEditSource, caVeEditNextnode, uriClone;
$caEdit = $( '#ca-edit' );
$caEditLink = $caEdit.find( 'a' );
$caSource = $( '#ca-viewsource' );
caVeEditNextnode = $caEdit.next().get( 0 );
var caVeEdit, caVeEditSource, uriClone,
action = this.pageExists ? 'edit' : 'create',
pTabsId = $( '#p-views' ).length ? 'p-views' : 'p-cactions',
$caSource = $( '#ca-viewsource' ),
$caEdit = $( '#ca-edit' ),
$caEditLink = $caEdit.find( 'a' ),
caVeEditNextnode = $caEdit.next().get( 0 );
if ( !$caEdit.length || $caSource.length ) {
// If there is no edit tab or a view-source tab,
@ -771,9 +773,6 @@ ve.init.mw.ViewPageTarget.prototype.setupSkinTabs = function () {
return;
}
action = this.pageExists ? 'edit' : 'create';
pTabsId = $( '#p-views' ).length ? 'p-views' : 'p-cactions';
// Add independent "VisualEditor" tab (#ca-ve-edit).
if ( this.tabLayout === 'add' ) {