Click Here To Subscribe To Intellectual Blogger And Receive Automatic Updates Via Email!

Sep 20, 2011

Blogger's New Lightbox Image Viewer, And How To Remove It!

How to remove Blogger Lightbox from blogspot, blogger blog
I'm sure a lot of you fellow bloggers have noticed that Blogger has decided to add a new feature to your blog, a lightbox style image viewer. The bad thing is, nobody knew it was coming and there doesn't seem to be an easy way to disable it if you don't like it. It might be a great feature for some people, but it seems that the majority of bloggers don't especially like it.

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.

Click Design > Edit HTML


At the very bottom of your template you will see </html>, right before that enter this code:

I got a tip from Mark over at http://englishjavadrinker.blogspot.comHe 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!

Find us on Facebook or follow us on Twitter!

2 comments:

  1. 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!

    ReplyDelete
  2. Google have added an option to disable it now.

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...