diff --git a/html/content.html b/html/content.html
index 9a1c3ec..87d53aa 100644
--- a/html/content.html
+++ b/html/content.html
@@ -81,11 +81,13 @@
function checkKey(e) {
e = e || window.event;
+
if (e.keyCode === 37) {
window.location.href = "feedthemonkey:previous";
- }
- else if (e.keyCode === 39) {
+ } else if (e.keyCode === 39) {
window.location.href = "feedthemonkey:next";
+ } else if(e.keyCode == 13) {
+ window.location.href = "feedthemonkey:open";
}
}
diff --git a/qml/Content.qml b/qml/Content.qml
index 8d3faab..07440be 100644
--- a/qml/Content.qml
+++ b/qml/Content.qml
@@ -86,13 +86,14 @@ Item {
onNavigationRequested: {
if (request.url == "feedthemonkey:previous") {
- // This is commented out because for some reason this reloads the page forever.
- // This will show the error that the feedthemonkey:previous location is not supported
- //request.action = WebEngineNavigationRequest.IgnoreRequest;
+ request.action = WebEngineView.IgnoreRequest;
app.showPreviousPost();
} else if (request.url == "feedthemonkey:next") {
- //request.action = WebEngineNavigationRequest.IgnoreRequest;
+ request.action = WebEngineView.IgnoreRequest;
app.showNextPost();
+ } else if (request.url == "feedthemonkey:open") {
+ request.action = WebEngineView.IgnoreRequest;
+ Qt.openUrlExternally(post.link)
} else if (request.navigationType !== WebEngineNavigationRequest.LinkClickedNavigation) {
request.action = WebEngineView.AcceptRequest;
} else {