Index: trunk/extensions/Narayam/js/ext.narayam.core.js |
— | — | @@ -427,10 +427,10 @@ |
428 | 428 | this.setup = function() { |
429 | 429 | // Build the menu |
430 | 430 | if ( !that.buildMenu() ){ |
431 | | - // /buildMenu() returned false |
432 | | - // No need to proceed |
433 | | - return; |
434 | | - } |
| 431 | + // /buildMenu() returned false |
| 432 | + // No need to proceed |
| 433 | + return; |
| 434 | + } |
435 | 435 | |
436 | 436 | // Restore state from cookies |
437 | 437 | var savedScheme = $.cookie( 'narayam-scheme' ); |
— | — | @@ -439,18 +439,21 @@ |
440 | 440 | $( '#narayam-' + savedScheme ).attr( 'checked', 'checked' ); |
441 | 441 | } else { |
442 | 442 | //if no saved input scheme, select the first. |
443 | | - $('input.narayam-scheme:first').attr( 'checked', 'checked' ); |
| 443 | + $( 'input.narayam-scheme:first' ).attr( 'checked', 'checked' ); |
444 | 444 | } |
445 | 445 | var enabledCookie = $.cookie( 'narayam-enabled' ); |
446 | 446 | if ( enabledCookie == '1' || ( mw.config.get( 'wgNarayamEnabledByDefault' ) && enabledCookie !== '0' ) ) { |
447 | 447 | that.enable(); |
448 | 448 | } |
449 | 449 | else { |
450 | | - $( 'li#pt-narayam').addClass( 'narayam-inactive' ); |
| 450 | + $( 'li#pt-narayam' ).addClass( 'narayam-inactive' ); |
451 | 451 | } |
452 | 452 | // Renew the narayam-enabled cookie. naraym-scheme is renewed by setScheme() |
453 | 453 | if ( enabledCookie ) { |
454 | | - $.cookie( 'narayam-enabled', enabledCookie, { 'path': '/', 'expires': 30 } ); |
| 454 | + $.cookie( 'narayam-enabled', enabledCookie, { |
| 455 | + 'path': '/', |
| 456 | + 'expires': 30 |
| 457 | + } ); |
455 | 458 | } |
456 | 459 | |
457 | 460 | }; |
— | — | @@ -483,7 +486,7 @@ |
484 | 487 | |
485 | 488 | if ( !haveSchemes ) { |
486 | 489 | // No schemes available, don't show the tool |
487 | | - // So return false |
| 490 | + // So return false |
488 | 491 | return false; |
489 | 492 | } |
490 | 493 | |
— | — | @@ -512,7 +515,10 @@ |
513 | 516 | .append( |
514 | 517 | $( '<a/>' ) |
515 | 518 | .text( mw.msg( 'narayam-help' ) ) |
516 | | - .attr( 'href', mw.util.wikiGetlink( mw.msg( 'narayam-help-page' ) )) |
| 519 | + .attr( |
| 520 | + 'href', |
| 521 | + mw.util.wikiGetlink( mw.msg( 'narayam-help-page' ) ) |
| 522 | + ) |
517 | 523 | ) |
518 | 524 | ); |
519 | 525 | } |
— | — | @@ -532,30 +538,30 @@ |
533 | 539 | ) |
534 | 540 | .append( $menuItemsDiv ); |
535 | 541 | |
536 | | - var $li = $( '<li id="pt-narayam" />'); |
537 | | - $li |
538 | | - .append( $menu ); |
| 542 | + var $li = $( '<li id="pt-narayam" />' ); |
| 543 | + $li.append( $menu ); |
539 | 544 | |
540 | | - //if rtl, add to the right of top personal links. Else, to the left |
541 | | - var fn = $('body').hasClass( 'rtl' ) ? "append" : "prepend"; |
542 | | - $('#p-personal ul:first')[fn]( $li ); |
| 545 | + // If rtl, add to the right of top personal links. Else, to the left |
| 546 | + var fn = $( 'body' ).hasClass( 'rtl' ) ? "append" : "prepend"; |
| 547 | + $( '#p-personal ul:first' )[fn]( $li ); |
543 | 548 | // Build enable/disable checkbox and label |
544 | 549 | $checkbox = $( '<input type="checkbox" id="narayam-toggle" />' ); |
545 | 550 | $checkbox |
546 | 551 | .attr( 'title', mw.msg( 'narayam-checkbox-tooltip' ) ) |
547 | 552 | .click( that.toggle ); |
548 | | - //workaround for IE bug - activex components like input fields coming on top of everything. |
549 | | - //TODO: is there a better solution other than hiding it on hover? |
| 553 | + // Workaround for IE bug - activex components like input fields |
| 554 | + // coming on top of everything. |
| 555 | + // TODO: is there a better solution other than hiding it on hover? |
550 | 556 | if ( $.browser.msie ) { |
551 | | - $("#narayam-menu").hover(function(){ |
552 | | - $("#searchform").css({ visibility: "hidden" }); |
| 557 | + $( "#narayam-menu" ).hover(function(){ |
| 558 | + $( "#searchform" ).css({ visibility: "hidden" }); |
553 | 559 | },function(){ |
554 | | - $("#searchform").css({ visibility: "visible" }); |
| 560 | + $( "#searchform" ).css({ visibility: "visible" }); |
555 | 561 | }); |
556 | 562 | } |
557 | | - |
558 | | - // Narayam controls setup complete, returns true |
559 | | - return true; |
| 563 | + |
| 564 | + // Narayam controls setup complete, returns true |
| 565 | + return true; |
560 | 566 | } |
561 | 567 | |
562 | 568 | } )(); |