Plugin Directory

Changeset 2553181


Ignore:
Timestamp:
06/24/2021 07:32:09 AM (5 years ago)
Author:
john1302
Message:

IE img src

Location:
wp-lozad/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-lozad/trunk/js/lozad.js

    r2552723 r2553181  
    6767        element.setAttribute('srcset', dataSrcset);
    6868        if (isIE && element.nodeName.toLowerCase() === 'img') {
    69           element.setAttribute('src', dataSrcset.split(',').pop().replace(/1x/i, '').trim());
     69          var ieImgSrc = null;
     70          dataSrcset.split(',').map(function(e) {
     71            if (e.indexOf(' 1x') !== -1) {
     72              ieImgSrc = e.replace(/1x/i, '').trim();
     73              return true;
     74            }
     75          });
     76          if (ieImgSrc) {
     77            element.setAttribute('src', ieImgSrc);
     78          }
    7079        }
    7180      }
  • wp-lozad/trunk/lozad.php

    r2552723 r2553181  
    44Description: lazy loading of images by baroda algorithm
    55Author: Evgeniy Kozenok
    6 Version: 1.4.6
     6Version: 1.4.7
    77*/
    88
  • wp-lozad/trunk/readme.txt

    r2552723 r2553181  
    44Requires at least: 5.0
    55Tested up to: 5.5
    6 Stable tag: 1.4.6
     6Stable tag: 1.4.7
    77License: GPL2
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    2424
    2525== Changelog ==
     26= 1.4.7 =
     27* 2021-06-24: IE img src
     28
    2629= 1.4.6 =
    2730* 2021-06-23: IE js supported
Note: See TracChangeset for help on using the changeset viewer.