User:Crynsos/global.js

// Override Lightboxes and go directly to the image's page when clicking on an image var ImageLightbox= { log:function(msg) { $.log(msg,'ImageLightbox'); }, track:function(fakeUrl){ window.jQuery.tracker.byStr('lightbox'+fakeUrl); }, init:function{ var self=this; if(!window.wgEnableImageLightboxExt){ this.log('disabled'); return; }   var images=$('#bodyContent').find('a.lightbox, a.image'); if(!images.exists){return;} images.unbind('.lightbox').bind('click.lightbox',function(ev){self.onClick.call(self,ev);}); }, onClick:function(ev){ }, show:function(imageName,caption){ } }; ImageLightbox.init.call(ImageLightbox);