mirror of
https://github.com/StarCitizenTools/mediawiki-extensions-TabberNeue.git
synced 2024-11-24 00:13:28 +00:00
fix: various issues found in code review
This commit is contained in:
parent
9e8ac878cc
commit
1f75afc217
|
@ -63,7 +63,7 @@ class Tabber {
|
||||||
|
|
||||||
$html = self::render( $input, $count, $parser, $frame );
|
$html = self::render( $input, $count, $parser, $frame );
|
||||||
|
|
||||||
$parserOutput->appendExtensionData( 'tabber-count', $count++ );
|
$parserOutput->appendExtensionData( 'tabber-count', ++$count );
|
||||||
|
|
||||||
if ( self::$useCodex === true ) {
|
if ( self::$useCodex === true ) {
|
||||||
$parser->getOutput()->addModules( [ 'ext.tabberNeue.codex' ] );
|
$parser->getOutput()->addModules( [ 'ext.tabberNeue.codex' ] );
|
||||||
|
|
|
@ -424,8 +424,9 @@ class TabberBuilder {
|
||||||
if ( !urlHash ) {
|
if ( !urlHash ) {
|
||||||
return activeTab;
|
return activeTab;
|
||||||
}
|
}
|
||||||
const idFromUrlHash = urlHash.replace( 'tabber-tabpanel-', 'tabber-tab-' );
|
const escapedHash = mw.util.escapeIdForAttribute( urlHash );
|
||||||
if ( idFromUrlHash === urlHash ) {
|
const idFromUrlHash = escapedHash.replace( 'tabber-tabpanel-', 'tabber-tab-' );
|
||||||
|
if ( idFromUrlHash === escapedHash ) {
|
||||||
return activeTab;
|
return activeTab;
|
||||||
}
|
}
|
||||||
const activeTabFromUrlHash = document.getElementById( idFromUrlHash );
|
const activeTabFromUrlHash = document.getElementById( idFromUrlHash );
|
||||||
|
|
|
@ -33,9 +33,6 @@ ve.ce.MWTabberTranscludeNode.static.primaryCommandName = 'mwTabberTransclude';
|
||||||
ve.ce.MWTabberTranscludeNode.static.lastHeader = null;
|
ve.ce.MWTabberTranscludeNode.static.lastHeader = null;
|
||||||
|
|
||||||
/* Methods */
|
/* Methods */
|
||||||
// eslint-disable-next-line no-var
|
|
||||||
var lastHeader;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue