galleria 1.2.6js bug
Error message : Could not extract width/height from image: brabra.....
Before
// Delay the callback to "fix" the Adblock Bug
// http://code.google.com/p/adblockforchrome/issues/detail?id=3701
if ( ( !this.width || !this.height ) ) {
window.setTimeout( (function( img ) {
return function() {
if ( img.width && img.height ) {
complete.call( img );
} else {
Galleria.raise('Could not extract width/height from image: ' + img.src +
'. Traced measures: width:' + img.width + 'px, height: ' + img.height + 'px.');
}
};
}( this )), 2);
} else {
complete.call( this );
}
After
// Delay the callback to "fix" the Adblock Bug
// http://code.google.com/p/adblockforchrome/issues/detail?id=3701
if ( ( !this.width || !this.height ) ) {
window.setTimeout( (function( img ) {
return function() {
if ( img.width && img.height ) {
complete.call( img );
} else {
try {
$('<img/>').attr('src',$(img).attr("src")).load(function() {complete.call( this )})
} catch(error_message) {
Galleria.raise('Could not extract width/height from image: ' + img.src +
'. Traced measures: width:' + img.width + 'px, height: ' + img.height + 'px.');
}
}
};
}( this )), 2);
} else {
complete.call( this );
}
0 件のコメント:
コメントを投稿