r104416 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104415‎ | r104416 | r104417 >
Date:10:03, 28 November 2011
Author:hashar
Status:ok
Tags:
Comment:
JSLint on ext.vipsScaler.js
Modified paths:
  • /trunk/extensions/VipsScaler/modules/ext.vipsScaler/ext.vipsScaler.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VipsScaler/modules/ext.vipsScaler/ext.vipsScaler.js
@@ -2,9 +2,9 @@
33 $.vipsScaler = {
44 /** function to alternate between both thumbnails */
55 switchThumbs: function() {
6 - var e = $('#mw-vipstest-thumbnails')
7 - var mask = e.children(".uc-mask")
8 - var caption = e.children(".uc-caption")
 6+ var e = $('#mw-vipstest-thumbnails');
 7+ var mask = e.children(".uc-mask");
 8+ var caption = e.children(".uc-caption");
99
1010 width = e.width();
1111 maskWidth = mask.width();
@@ -17,7 +17,7 @@
1818 mask.width( 0 );
1919 caption.html( e.children("img:eq(1)").attr("alt") );
2020 }
21 - },
 21+ }
2222 };
2323
2424 var container = document.getElementById( 'mw-vipstest-thumbnails' );
@@ -44,10 +44,12 @@
4545 * Also add a click handler to instantly switch beetween pics
4646 * This can be done by clicking the thumbnail or using a checkbox
4747 */
48 - $('#mw-vipstest-thumbs-switch')
49 - .click( function() { $.vipsScaler.switchThumbs() } );
50 - $('#mw-vipstest-thumbnails')
51 - .click( function() { $.vipsScaler.switchThumbs() } );
 48+ $('#mw-vipstest-thumbs-switch').click(
 49+ function() { $.vipsScaler.switchThumbs(); }
 50+ );
 51+ $('#mw-vipstest-thumbnails').click(
 52+ function() { $.vipsScaler.switchThumbs(); }
 53+ );
5254 }
5355 }
5456 );

Status & tagging log