public
Description: A quick & dirty git-powered Sinatra wiki
Homepage: http://atonie.org/2008/02/git-wiki
Clone URL: git://github.com/sr/git-wiki.git
Bind ctrl+h to homepage and ctrl+l to page listing using jQuery's hotkeys 
plugin
sr (author)
Fri Mar 28 06:22:39 -0700 2008
commit  b9bc2fe998397f94526f6222018139f91fd4a6a1
tree    f734734aa641ac27300045bed62a7f1a2b59418b
parent  bdd344065ef79d97f3e2e5a7f137c13e2b1ce0aa
...
120
121
122
 
123
124
125
126
127
128
 
 
129
130
131
...
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
0
@@ -120,12 +120,15 @@ __END__
0
     %script{:src => '/jquery-1.2.3.min.js', :type => 'text/javascript'}
0
     %script{:src => '/jquery.jeditable.js', :type => 'text/javascript'}
0
     %script{:src => '/jquery.autogrow.js', :type => 'text/javascript'}
0
+ %script{:src => '/jquery.hotkeys.js', :type => 'text/javascript'}
0
     :javascript
0
       $(document).ready(function() {
0
         $('#navigation').hide();
0
         $('#edit_link').hide();
0
         /*$('#content').prepend('<p id="help">Press <strong>CTRL+H</strong> if you need help</strong></p>');*/
0
         $('#help').fadeOut(3500);
0
+ $.hotkeys.add('Ctrl+h', function() { document.location = '#{HOMEPAGE}' })
0
+ $.hotkeys.add('Ctrl+l', function() { document.location = '/_list' })
0
       })
0
   %body
0
     %ul#navigation

Comments

    No one has commented yet.