Index: trunk/extensions/Narayam/resources/ext.narayam.core.js |
— | — | @@ -56,7 +56,7 @@ |
57 | 57 | if ( regex.test( str ) // Input string match |
58 | 58 | && |
59 | 59 | ( |
60 | | - rules[i][1].length == 0 // Keybuffer match not required |
| 60 | + rules[i][1].length === 0 // Keybuffer match not required |
61 | 61 | || |
62 | 62 | ( // Keybuffer match specified, so it should be met |
63 | 63 | rules[i][1].length > 0 |
— | — | @@ -130,7 +130,7 @@ |
131 | 131 | shiftKey: false, |
132 | 132 | cmdKey: false, |
133 | 133 | key: 'm' |
134 | | - } |
| 134 | + }; |
135 | 135 | // Browser sniffing to determine the available shortcutKey |
136 | 136 | // Refer: mediawiki.util.js and en.wikipedia.org/wiki/Access_key |
137 | 137 | var profile = $.client.profile(); |
— | — | @@ -168,7 +168,7 @@ |
169 | 169 | text += 'Command-'; |
170 | 170 | } |
171 | 171 | text += shortcutKey.key.toUpperCase(); |
172 | | - return text; |
| 172 | + return text; |
173 | 173 | } |
174 | 174 | |
175 | 175 | /** |
— | — | @@ -428,7 +428,7 @@ |
429 | 429 | */ |
430 | 430 | this.getScheme = function( name ) { |
431 | 431 | return schemes[name]; |
432 | | - } |
| 432 | + }; |
433 | 433 | |
434 | 434 | /** |
435 | 435 | * Change the current transliteration scheme |
— | — | @@ -438,9 +438,9 @@ |
439 | 439 | var recent = $.cookie( 'narayam-scheme' ) || []; |
440 | 440 | if ( typeof recent === "string" ) { |
441 | 441 | recent = recent.split( "," ); |
442 | | - }; |
| 442 | + } |
443 | 443 | recent = $.grep( recent, function( value ) { |
444 | | - return value != name; |
| 444 | + return value != name; |
445 | 445 | } ); |
446 | 446 | recent.unshift( name ); |
447 | 447 | recent = recent.slice( 0, recentItemsLength ); |
— | — | @@ -465,7 +465,7 @@ |
466 | 466 | this.setup = function() { |
467 | 467 | that.buildMenu(); |
468 | 468 | // Restore state from cookies |
469 | | - var recentSchemes = $.cookie( 'narayam-scheme' ); |
| 469 | + var recent = $.cookie( 'narayam-scheme' ); |
470 | 470 | var lastScheme = null; |
471 | 471 | if ( typeof recent === "string" ) { |
472 | 472 | lastScheme = recent.split( "," )[0]; |
— | — | @@ -531,7 +531,7 @@ |
532 | 532 | if ( $.inArray( scheme, seen ) > -1 ) { continue; } |
533 | 533 | seen.push( scheme ); |
534 | 534 | if ( count++ > recentItemsLength ) { break; } |
535 | | - $narayamMenuItem = that.buildMenuItem( scheme ); |
| 535 | + var $narayamMenuItem = that.buildMenuItem( scheme ); |
536 | 536 | $narayamMenuItem.addClass( 'narayam-recent-menu-item' ); |
537 | 537 | $narayamMenuItems.append( $narayamMenuItem ); |
538 | 538 | } |
— | — | @@ -548,7 +548,7 @@ |
549 | 549 | haveSchemes = true; |
550 | 550 | if ( $.inArray( scheme, seen ) !== -1 ) { continue; } |
551 | 551 | seen.push( scheme ); |
552 | | - $narayamMenuItem = that.buildMenuItem( scheme ); |
| 552 | + var $narayamMenuItem = that.buildMenuItem( scheme ); |
553 | 553 | $narayamMenuItems.append( $narayamMenuItem ); |
554 | 554 | } |
555 | 555 | } |
— | — | @@ -599,7 +599,7 @@ |
600 | 600 | // Donot repeat the input methods in more input methods section. |
601 | 601 | // If already shown on recent items. |
602 | 602 | if ( $.inArray( langscheme, seen ) > -1 ) { continue; } |
603 | | - $narayamMenuItem = that.buildMenuItem( langscheme ); |
| 603 | + var $narayamMenuItem = that.buildMenuItem( langscheme ); |
604 | 604 | $narayamMenuItem.addClass( 'narayam-scheme-dynamic-item' ); |
605 | 605 | $narayamMenuItems.append( $narayamMenuItem ); |
606 | 606 | |