Yaron Koren has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/394594 )

Change subject: Fixed JS bug for some non-Vector skins
......................................................................


Fixed JS bug for some non-Vector skins

This seems to happen at least with Chameleon, in some cases - fix derived from:

https://github.com/lvivski/animatic/issues/27

Change-Id: I05e37c76508d29e672fb9e2c82ffe7b88b629c31
---
M HeaderTabs_body.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Yaron Koren: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/HeaderTabs_body.php b/HeaderTabs_body.php
index 5a5c562..ab687eb 100644
--- a/HeaderTabs_body.php
+++ b/HeaderTabs_body.php
@@ -257,7 +257,7 @@
 
                $text = $above . $tabhtml . $below;
 
-               $parser->getOutput()->addHeadItem(Html::inlineScript( 
'document.styleSheets[0].insertRule?document.styleSheets[0].insertRule(".unselected
 {display:none;}", 0):document.styleSheets[0].addRule(".unselected", 
"display:none");' ), true );
+               $parser->getOutput()->addHeadItem(Html::inlineScript( 'var ss = 
document.styleSheets[0]; ss.insertRule ? ss.insertRule(".unselected 
{display:none;}", ss.rules.length) : ss.addRule(".unselected", 
"display:none");' ), true );
 
                foreach ( $tabs as $i => $tab ) {
                        $tabTitle = str_replace( ' ', '_', $tab['title'] );

-- 
To view, visit https://gerrit.wikimedia.org/r/394594
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I05e37c76508d29e672fb9e2c82ffe7b88b629c31
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/HeaderTabs
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <[email protected]>
Gerrit-Reviewer: Yaron Koren <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to