Difference between revisions of "MediaWiki:Common.js"
From Marathon Documentation
Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ |
/* Any JavaScript here will be loaded for all users on every page load. */ |
||
− | function open_in_mmv(href) { var t = $('a.image[href="' + (href || this.href) + '"]'); return t && t.length ? (t[0].click() || false) && false : true; } |
+ | function open_in_mmv(href) { var t = $('a.image[href="' + (href || this.href) + '"]').not(":has(img.expand-image)"); return t && t.length ? (t[0].click() || false) && false : true; } |
− | $('img.expand-image').click(function () { $(this).toggleClass('expanded-image'); }); |
+ | $('img.expand-image').click(function () { $(this).toggleClass('expanded-image'); return false; }); |
Revision as of 10:17, 16 June 2015
/* Any JavaScript here will be loaded for all users on every page load. */ function open_in_mmv(href) { var t = $('a.image[href="' + (href || this.href) + '"]').not(":has(img.expand-image)"); return t && t.length ? (t[0].click() || false) && false : true; } $('img.expand-image').click(function () { $(this).toggleClass('expanded-image'); return false; });