Sumit has uploaded a new change for review. https://gerrit.wikimedia.org/r/221898
Change subject: WikidataPageBanner remove url for 2x from srcset ...................................................................... WikidataPageBanner remove url for 2x from srcset Remove the image-url for 2x from srcset. 'w' takes care of hi-res devices. See http://stackoverflow.com/questions/26928828/html5-srcset-mixing-x-and-w-syntax. Bug: T103994 Change-Id: I46180fbd8eaaf4f3bb7f3c505bcf9902f8d45249 --- M includes/WikidataPageBanner.hooks.php 1 file changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataPageBanner refs/changes/98/221898/1 diff --git a/includes/WikidataPageBanner.hooks.php b/includes/WikidataPageBanner.hooks.php index 24f4928..3234c2b 100644 --- a/includes/WikidataPageBanner.hooks.php +++ b/includes/WikidataPageBanner.hooks.php @@ -187,10 +187,8 @@ } $i++; } - // only use the largest size url as a hi-res banner url, as a mix - // of 'w' and 'x' causes issues in chrome - $url = $urls[$i-1]; - $srcset .= "$url 2x"; + // remove last comma + $srcset = substr( $srcset, 0, -1 ); $bannerurl = $urls[0]; $bannerfile = str_replace( "$1", "File:$bannername", $wgArticlePath ); $templateParser = new TemplateParser( __DIR__ . '/../templates' ); -- To view, visit https://gerrit.wikimedia.org/r/221898 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I46180fbd8eaaf4f3bb7f3c505bcf9902f8d45249 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikidataPageBanner Gerrit-Branch: master Gerrit-Owner: Sumit <asthana.sumi...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits