mediawiki.hidpi: Add skipFunction to forgo loading in modern browsers

Chromium 34 (stable release April 8, 2014) introduced support
for the srcset attribute.

Chroem 34+ and Opera 21+ support this now. While the jquery.hidpi
module doesn't emulate srcset in browser that support it, we do
still load it.

http://blog.chromium.org/2014/02/chrome-34-responsive-images-and_9316.html
http://googlechromereleases.blogspot.com/2014/04/stable-channel-update.html
http://caniuse.com/srcset

Change-Id: I0498c9cc0f25e3d366879d9d3430ee8371efcf11
This commit is contained in:
Timo Tijhof 2014-07-16 04:19:04 +02:00 committed by Reedy
parent 599c550429
commit 71f54b25f0
2 changed files with 5 additions and 0 deletions

View file

@ -865,6 +865,7 @@ return array(
'dependencies' => array(
'jquery.hidpi',
),
'skipFunction' => 'resources/src/mediawiki.hidpi-skip.js',
'targets' => array( 'desktop', 'mobile' ),
),
'mediawiki.hlist' => array(

View file

@ -0,0 +1,4 @@
/*!
* Skip function for mediawiki.hdpi.js.
*/
return 'srcset' in new Image();