mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 18:39:52 +00:00
Clean up variable initialization in setupSkinTabs()
Change-Id: Ic596f1c98162557f33f5ca398d2358e91a3d5cb0
This commit is contained in:
parent
fa73dbeca5
commit
b295dc8d99
|
@ -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' ) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue