Skip to content
This repository has been archived by the owner on Jan 6, 2020. It is now read-only.

Commit

Permalink
* update readme
Browse files Browse the repository at this point in the history
* cleanup shortcut js
  • Loading branch information
SSilence committed Apr 14, 2013
1 parent bd52166 commit f5e5d6d
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 28 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ selfoss
Copyright (c) 2013 Tobias Zeising, [email protected]
http://selfoss.aditu.de
Licensed under the GPLv3 license
Version 2.6
Version 2.7-SNAPSHOT


INSTALLATION
Expand Down Expand Up @@ -50,6 +50,11 @@ Visit the page http://yourselfossurl.com/opml for importing your OPML File. If y
CHANGELOG
---------

Version 2.7-SNAPSHOT
* new spout for instapaper (thanks a lot to janeczku)
* new Hungarian translation (thanks a lot to Sancho)
* fix keyboard shortcut on some browsers

Version 2.6
* fixed OPML import for other formats (thanks a lot to Remy Gardette)
* fix deletion of sources (no longer bad request)
Expand Down
17 changes: 17 additions & 0 deletions _docs/website/feed
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<author>
<name>Tobias Zeising</name>
</author>
<title>selfoss release feed</title>
<id>urn:uuid:cdefc130-a4f9-11e2-9e96-0800200c9a66</id>
<updated>2013-04-14T13:52:00Z</updated>
<entry>
<title>Version 2.6</title>
<link href="http://selfoss.aditu.de/selfoss-2.6.zip"/>
<id>selfoss-2.6</id>
<updated>2013-04-14T13:52:00Z</updated>
<summary>new selfoss version 2.6</summary>
<content>new selfoss version 2.6</content>
</entry>
</feed>
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
$f3 = require(__DIR__.'/libs/f3/base.php');

$f3->set('DEBUG',0);
$f3->set('version','2.6');
$f3->set('version','2.7-SNAPSHOT');
$f3->set('AUTOLOAD',__dir__.'/;libs/f3/;libs/;libs/WideImage/;daos/;libs/twitteroauth/;libs/FeedWriter/');
$f3->set('cache',__dir__.'/data/cache');
$f3->set('BASEDIR',__dir__);
Expand Down
93 changes: 67 additions & 26 deletions public/js/selfoss-shortcuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,82 +5,123 @@ selfoss.shortcuts = {
* init shortcuts
*/
init: function() {
// next
$(document).bind('keydown', 'space', function() {
// 'space': next article
$(document).bind('keydown', 'space', function(e) {
var selected = $('.entry.selected');
if(selected.length>0 && selected.find('.entry-content').is(':visible')==false) {
selected.find('.entry-title').click();
} else {
selfoss.shortcuts.nextprev('next', true);
}
e.preventDefault();
return false;
});
$(document).bind('keydown', 'n', function() { selfoss.shortcuts.nextprev('next', false); return false; });
$(document).bind('keydown', 'right', function() {

// 'n': next article
$(document).bind('keydown', 'n', function(e) {
selfoss.shortcuts.nextprev('next', false);
e.preventDefault();
return false;
});

// 'right cursor': next article
$(document).bind('keydown', 'right', function(e) {
selfoss.shortcuts.entrynav('next');
e.preventDefault();
return false;
});

// 'j': next article
$(document).bind('keydown', 'j', function(e) {
selfoss.shortcuts.nextprev('next', true);
e.preventDefault();
return false;
});
$(document).bind('keydown', 'j', function() { selfoss.shortcuts.nextprev('next', true); return false; });

// prev
$(document).bind('keydown', 'shift+space', function() { selfoss.shortcuts.nextprev('prev', true); return false; });
$(document).bind('keydown', 'p', function() { selfoss.shortcuts.nextprev('prev', false); return false; });
$(document).bind('keydown', 'left', function() {
// 'shift+space': previous article
$(document).bind('keydown', 'shift+space', function(e) {
selfoss.shortcuts.nextprev('prev', true);
e.preventDefault();
return false;
});

// 'p': previous article
$(document).bind('keydown', 'p', function(e) {
selfoss.shortcuts.nextprev('prev', false);
e.preventDefault();
return false;
});

// 'left': previous article
$(document).bind('keydown', 'left', function(e) {
selfoss.shortcuts.entrynav('prev');
e.preventDefault();
return false;
});

// 'k': previous article
$(document).bind('keydown', 'k', function(e) {
selfoss.shortcuts.nextprev('prev', true);
e.preventDefault();
return false;
});
$(document).bind('keydown', 'k', function() { selfoss.shortcuts.nextprev('prev', true); return false; });

// star/unstar
$(document).bind('keydown', 's', function() {
// 's': star/unstar
$(document).bind('keydown', 's', function(e) {
selfoss.events.entriesToolbar($('.entry.selected'));
$('.entry.selected .entry-starr').click();
e.preventDefault();
return false;
});

// mark/unmark
$(document).bind('keydown', 'm', function() {
// 'm': mark/unmark
$(document).bind('keydown', 'm', function(e) {
selfoss.events.entriesToolbar($('.entry.selected'));
$('.entry.selected .entry-unread').click();
e.preventDefault();
return false;
});

// open/close entry
// can be used in combination with left and right key
$(document).bind('keydown', 'o', function() {
// 'o': open/close entry
$(document).bind('keydown', 'o', function(e) {
$('.entry.selected').find('h2').click();
e.preventDefault();
return false;
});

// open target
$(document).bind('keydown', 'v', function() {
// 'v': open target
$(document).bind('keydown', 'v', function(e) {
window.open($('.entry.selected .entry-source').attr('href'));
e.preventDefault();
return false;
});

// Reload the current view
$(document).bind('keydown', 'r', function() {
// 'r': Reload the current view
$(document).bind('keydown', 'r', function(e) {
selfoss.reloadList();
e.preventDefault();
return false;
});

// mark all as read
$(document).bind('keydown', 'ctrl+m', function() {
// 'Ctrl+m': mark all as read
$(document).bind('keydown', 'ctrl+m', function(e) {
$('#nav-mark').click();
e.preventDefault();
return false;
});

// throw (mark as read & open next)
$(document).bind('keydown', 't', function() {
// 't': throw (mark as read & open next)
$(document).bind('keydown', 't', function(e) {
$('.entry.selected.unread .entry-unread').click();
selfoss.shortcuts.nextprev('next', true);
return false;
});

// throw (mark as read & open previous)
$(document).bind('keydown', 'Shift+t', function() {
$(document).bind('keydown', 'Shift+t', function(e) {
$('.entry.selected.unread .entry-unread').click();
selfoss.shortcuts.nextprev('prev', true);
e.preventDefault();
return false;
});
},
Expand Down

0 comments on commit f5e5d6d

Please sign in to comment.