Version Description
Download this release
Release Info
Developer | bjornjohansen |
Plugin | BJ Lazy Load |
Version | 0.7.1 |
Comparing to | |
See all releases |
Code changes from version 0.7.0 to 0.7.1
- bj-lazy-load.php +2 -2
- js/bj-lazy-load.js +1 -1
- js/combined.min.js +1 -1
- readme.txt +5 -2
bj-lazy-load.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: BJ Lazy Load
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/bj-lazy-load/
|
5 |
Description: Lazy image loading makes your site load faster and saves bandwidth.
|
6 |
-
Version: 0.7.
|
7 |
Author: Bjørn Johansen
|
8 |
Author URI: http://twitter.com/bjornjohansen
|
9 |
Text Domain: bj-lazy-load
|
@@ -33,7 +33,7 @@ require_once( dirname(__FILE__) . '/inc/class-bjll-skip-post.php' );
|
|
33 |
if ( ! class_exists( 'BJLL' ) ) {
|
34 |
class BJLL {
|
35 |
|
36 |
-
const version = '0.7.
|
37 |
protected $_placeholder_url;
|
38 |
protected $_skip_classes;
|
39 |
|
3 |
Plugin Name: BJ Lazy Load
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/bj-lazy-load/
|
5 |
Description: Lazy image loading makes your site load faster and saves bandwidth.
|
6 |
+
Version: 0.7.1
|
7 |
Author: Bjørn Johansen
|
8 |
Author URI: http://twitter.com/bjornjohansen
|
9 |
Text Domain: bj-lazy-load
|
33 |
if ( ! class_exists( 'BJLL' ) ) {
|
34 |
class BJLL {
|
35 |
|
36 |
+
const version = '0.7.1';
|
37 |
protected $_placeholder_url;
|
38 |
protected $_skip_classes;
|
39 |
|
js/bj-lazy-load.js
CHANGED
@@ -33,7 +33,7 @@ var BJLL = BJLL || {};
|
|
33 |
if ( 'undefined' != typeof ( BJLL.site_url ) && 'undefined' != typeof ( BJLL.network_site_url ) ) {
|
34 |
srcimgurl = srcimgurl.replace( BJLL.site_url, BJLL.network_site_url );
|
35 |
}
|
36 |
-
imgurl = BJLL.thumb_base +
|
37 |
}
|
38 |
|
39 |
}
|
33 |
if ( 'undefined' != typeof ( BJLL.site_url ) && 'undefined' != typeof ( BJLL.network_site_url ) ) {
|
34 |
srcimgurl = srcimgurl.replace( BJLL.site_url, BJLL.network_site_url );
|
35 |
}
|
36 |
+
imgurl = BJLL.thumb_base + encodeURIComponent( srcimgurl ) + '&w=' + loadimgwidth;
|
37 |
}
|
38 |
|
39 |
}
|
js/combined.min.js
CHANGED
@@ -17,7 +17,7 @@ if("yes"==BJLL.load_responsive||"yes"==BJLL.load_hidpi){var a=document.createEle
|
|
17 |
if(a.href=t.attr("data-lazy-src"),!a.hostname.length||a.hostname==window.location.hostname){var i=parseInt(t.css("width"))
|
18 |
window.devicePixelRatio>1&&"yes"==BJLL.load_hidpi&&(i=Math.ceil(window.devicePixelRatio*i))
|
19 |
var l=t.attr("data-lazy-src")
|
20 |
-
void 0!==BJLL.site_url&&void 0!==BJLL.network_site_url&&(l=l.replace(BJLL.site_url,BJLL.network_site_url)),r=BJLL.thumb_base+
|
21 |
if(!e)return e
|
22 |
e+=""
|
23 |
do r=d.indexOf(e.charAt(c++)),a=d.indexOf(e.charAt(c++)),i=d.indexOf(e.charAt(c++)),l=d.indexOf(e.charAt(c++)),s=r<<18|a<<12|i<<6|l,t=255&s>>16,n=255&s>>8,o=255&s,h[f++]=64==i?String.fromCharCode(t):64==l?String.fromCharCode(t,n):String.fromCharCode(t,n,o)
|
17 |
if(a.href=t.attr("data-lazy-src"),!a.hostname.length||a.hostname==window.location.hostname){var i=parseInt(t.css("width"))
|
18 |
window.devicePixelRatio>1&&"yes"==BJLL.load_hidpi&&(i=Math.ceil(window.devicePixelRatio*i))
|
19 |
var l=t.attr("data-lazy-src")
|
20 |
+
void 0!==BJLL.site_url&&void 0!==BJLL.network_site_url&&(l=l.replace(BJLL.site_url,BJLL.network_site_url)),r=BJLL.thumb_base+encodeURIComponent(l)+"&w="+i}}t.hide().attr("src",r).removeClass("lazy-hidden").fadeIn()}else"iframe"==o&&t.replaceWith(n(t.attr("data-lazy-src")))}).addClass("data-lazy-ready")}function n(e){var t,n,o,r,a,i,l,s,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c=0,f=0,u="",h=[]
|
21 |
if(!e)return e
|
22 |
e+=""
|
23 |
do r=d.indexOf(e.charAt(c++)),a=d.indexOf(e.charAt(c++)),i=d.indexOf(e.charAt(c++)),l=d.indexOf(e.charAt(c++)),s=r<<18|a<<12|i<<6|l,t=255&s>>16,n=255&s>>8,o=255&s,h[f++]=64==i?String.fromCharCode(t):64==l?String.fromCharCode(t,n):String.fromCharCode(t,n,o)
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== BJ Lazy Load ===
|
2 |
Contributors: bjornjohansen
|
3 |
-
Donate link:
|
4 |
Tags: images, iframes, lazy loading, jquery, javascript, optimize, performance, bandwidth, responsive design, hidpi, retina
|
5 |
Author URI: http://twitter.com/bjornjohansen
|
6 |
Requires at least: 3.5
|
7 |
-
Stable tag: 0.7.
|
8 |
|
9 |
Lazy loading makes your site load faster and saves bandwidth. Uses jQuery and degrades gracefully for non-js users. Works with both images and iframes.
|
10 |
|
@@ -61,6 +61,9 @@ Check your HTML source or see the magic at work in Web Inspector, FireBug or sim
|
|
61 |
|
62 |
== Changelog ==
|
63 |
|
|
|
|
|
|
|
64 |
= Version 0.7.0 =
|
65 |
* Added meta box to all public post types to exclude BJ Lazy Load for individual posts/pages
|
66 |
* Placeholder image is replaced with a really short data-uri (thanks @jruizcantero)
|
1 |
=== BJ Lazy Load ===
|
2 |
Contributors: bjornjohansen
|
3 |
+
Donate link: http://www.kiva.org/
|
4 |
Tags: images, iframes, lazy loading, jquery, javascript, optimize, performance, bandwidth, responsive design, hidpi, retina
|
5 |
Author URI: http://twitter.com/bjornjohansen
|
6 |
Requires at least: 3.5
|
7 |
+
Stable tag: 0.7.1
|
8 |
|
9 |
Lazy loading makes your site load faster and saves bandwidth. Uses jQuery and degrades gracefully for non-js users. Works with both images and iframes.
|
10 |
|
61 |
|
62 |
== Changelog ==
|
63 |
|
64 |
+
= Version 0.7.1 =
|
65 |
+
* Proper encoding of non-ASCII characters in filenames when using responsive or hiDPI images (thanks @testsiteoop)
|
66 |
+
|
67 |
= Version 0.7.0 =
|
68 |
* Added meta box to all public post types to exclude BJ Lazy Load for individual posts/pages
|
69 |
* Placeholder image is replaced with a really short data-uri (thanks @jruizcantero)
|