Permalink
Browse files

More mindless refactoring.

Missed this one…
  • Loading branch information...
1 parent 5699986 commit 0c22890f46faf9ec7503f11e65730d4675a09737 Michael Sisk committed Dec 3, 2013
Showing with 12 additions and 12 deletions.
  1. +12 −12 -/js/shortcuts.js
View
@@ -3,25 +3,25 @@ jQuery( function( $ ) {
function webcomic_shortcut( target ) {
var $e;
- if ( $( '[data-webcomic-shortcuts]' ).length ) {
- $e = $( '[data-webcomic-shortcuts]:first ' + target + '[href]:first' );
+ if ( $( "[data-webcomic-shortcuts]" ).length ) {
+ $e = $( "[data-webcomic-shortcuts]:first " + target + "[href]:first" );
} else {
- $e = $( target + '[href]:first' );
+ $e = $( target + "[href]:first" );
}
if ( $e.length ) {
- if ( $.fn.webcomicDynamicNavigation && $e.closest( '[data-webcomic-container]' ).length ) {
- $e.trigger( 'click' );
+ if ( $.fn.webcomicDynamicNavigation && $e.closest( "[data-webcomic-container]" ).length ) {
+ $e.trigger( "click" );
} else {
- window.location.href = $e.attr( 'href' );
+ window.location.href = $e.attr( "href" );
}
}
}
- $.hotkeys.add( 'right', function() { webcomic_shortcut( '.next-webcomic-link' ); } );
- $.hotkeys.add( 'left', function() { webcomic_shortcut( '.previous-webcomic-link' ); } );
- $.hotkeys.add( 'shift+right', function() { webcomic_shortcut( '.last-webcomic-link' ); } );
- $.hotkeys.add( 'shift+left', function() { webcomic_shortcut( '.first-webcomic-link' ); } );
- $.hotkeys.add( 'shift+up', function() { webcomic_shortcut( '.purchase-webcomic-link' ); } );
- $.hotkeys.add( 'shift+down', function() { webcomic_shortcut( '.random-webcomic-link' ); } );
+ $.hotkeys.add( "right", function() { webcomic_shortcut( ".next-webcomic-link" ); } );
+ $.hotkeys.add( "left", function() { webcomic_shortcut( ".previous-webcomic-link" ); } );
+ $.hotkeys.add( "shift+right", function() { webcomic_shortcut( ".last-webcomic-link" ); } );
+ $.hotkeys.add( "shift+left", function() { webcomic_shortcut( ".first-webcomic-link" ); } );
+ $.hotkeys.add( "shift+up", function() { webcomic_shortcut( ".purchase-webcomic-link" ); } );
+ $.hotkeys.add( "shift+down", function() { webcomic_shortcut( ".random-webcomic-link" ); } );
} );

0 comments on commit 0c22890

Please sign in to comment.