mirror of
https://github.com/FAUSheppy/javascript-lazyload
synced 2025-12-06 12:21:35 +01:00
do not modify string by default
This commit is contained in:
@@ -54,8 +54,8 @@ function changeSrc(offset){
|
|||||||
&& boundingClientRect.top < window.innerHeight + offset) {
|
&& boundingClientRect.top < window.innerHeight + offset) {
|
||||||
|
|
||||||
var newSrc = elements[i].getAttribute(IDENT)
|
var newSrc = elements[i].getAttribute(IDENT)
|
||||||
/* remove url( ... ) */
|
/* remove url( ... ) if it is used */
|
||||||
newSrc = newSrc.substring(4,newSrc.length-1)
|
//newSrc = newSrc.substring(4,newSrc.length-1)
|
||||||
|
|
||||||
if(newSrc.indexOf(".jpg") > -1){
|
if(newSrc.indexOf(".jpg") > -1){
|
||||||
/* get correct size */
|
/* get correct size */
|
||||||
|
|||||||
Reference in New Issue
Block a user