mirror of
https://github.com/StarCitizenTools/mediawiki-extensions-TabberNeue.git
synced 2024-11-23 16:06:45 +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 );
|
||||
|
||||
$parserOutput->appendExtensionData( 'tabber-count', $count++ );
|
||||
$parserOutput->appendExtensionData( 'tabber-count', ++$count );
|
||||
|
||||
if ( self::$useCodex === true ) {
|
||||
$parser->getOutput()->addModules( [ 'ext.tabberNeue.codex' ] );
|
||||
|
|
|
@ -424,8 +424,9 @@ class TabberBuilder {
|
|||
if ( !urlHash ) {
|
||||
return activeTab;
|
||||
}
|
||||
const idFromUrlHash = urlHash.replace( 'tabber-tabpanel-', 'tabber-tab-' );
|
||||
if ( idFromUrlHash === urlHash ) {
|
||||
const escapedHash = mw.util.escapeIdForAttribute( urlHash );
|
||||
const idFromUrlHash = escapedHash.replace( 'tabber-tabpanel-', 'tabber-tab-' );
|
||||
if ( idFromUrlHash === escapedHash ) {
|
||||
return activeTab;
|
||||
}
|
||||
const activeTabFromUrlHash = document.getElementById( idFromUrlHash );
|
||||
|
|
|
@ -33,9 +33,6 @@ ve.ce.MWTabberTranscludeNode.static.primaryCommandName = 'mwTabberTransclude';
|
|||
ve.ce.MWTabberTranscludeNode.static.lastHeader = null;
|
||||
|
||||
/* Methods */
|
||||
// eslint-disable-next-line no-var
|
||||
var lastHeader;
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue