Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion recipes/franz-custom-website/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "franz-custom-website",
"name": "Custom Website",
"version": "1.5.1",
"version": "1.6.0",
"license": "MIT",
"repository": "https://github.com/meetfranz/recipe-custom-website",
"config": {
Expand Down
9 changes: 3 additions & 6 deletions recipes/franz-custom-website/webview.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ const _path = _interopRequireDefault(require('path'));
module.exports = (Ferdium, settings) => {
Ferdium.injectCSS(_path.default.join(__dirname, 'style.css'));

if (settings.trapLinkClicks === true) return;

// TODO: See how this can be moved into the main ferdium app and sent as an ipc message for opening with a new window or same Ferdium recipe's webview based on user's preferences
document.addEventListener(
'click',
Expand All @@ -22,12 +24,7 @@ module.exports = (Ferdium, settings) => {
if (!Ferdium.isImage(link)) {
event.preventDefault();
event.stopPropagation();

if (settings.trapLinkClicks === true) {
window.location.href = url;
} else {
Ferdium.openNewWindow(url);
}
Ferdium.openNewWindow(url);
}
}
},
Expand Down