On this blog for instance, I occasionally post example images with a caption stating to click the image for a larger view. I do this because some images are quite large and if I posted the full size image on the blog post it would be huge and wouldn't work. With Blogger's new feature, when you click an image it opens the lightbox, and you can't zoom in on larger files like you could before.
So here is a trick to disable this new feature.
I got a tip from Mark over at http://englishjavadrinker.blogspot.com, He has a couple of codes for you to try. After reading his blog, I realized that you can add this code right from Design > Add A Gadget > HTML. Just paste in the code and you don't have to mess with your blog's main HTML code, and you don't have to wait for the entire page to load before the code works. Thanks Mark!
<script type='text/javascript'>
//<![CDATA[
function killLightbox() {
var images = document.getElementsByTagName(
'img');
for (var i = 0 ; i < images.length ; ++i) {
images[i].onmouseover=function() {
var html = this.parentNode.innerHTML;
this.parentNode.innerHTML = html;
this.onmouseover = null;
};
}
}
if (window.addEventListener) {
window.addEventListener('load',killLightbox,undefined);
} else {
window.attachEvent('onload',killLightbox);
}
//]]>
</script>
Voila, now your images will open as they always have. This is a good workaround until Blogger gives us the option to disable it manually. Hope this helped!
<script type='text/javascript'>
//<![CDATA[
function killLightbox() {
var images = document.getElementsByTagName(
'img');
for (var i = 0 ; i < images.length ; ++i) {
images[i].onmouseover=function() {
var html = this.parentNode.innerHTML;
this.parentNode.innerHTML = html;
this.onmouseover = null;
};
}
}
if (window.addEventListener) {
window.addEventListener('load',killLightbox,undefined);
} else {
window.attachEvent('onload',killLightbox);
}
//]]>
</script>
Voila, now your images will open as they always have. This is a good workaround until Blogger gives us the option to disable it manually. Hope this helped!

Thank you so much! :) I have been looking for this, for a few days now, and you cannot imagine how grateful I am, that I found your tutorial! Thanks a lot!
ReplyDeleteGoogle have added an option to disable it now.
ReplyDelete