Skip to content

Commit

Permalink
merge openlink feature (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
oetiker authored Feb 15, 2024
1 parent 61a6a0b commit bc5f5e8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
12 changes: 12 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
0.49.0 2024-01-09 09:45:14 +0100 Tobias Oetiker <[email protected]>

- add new action: openLink

return {
action => 'openLink',
url => $url,
target => '_blank',
features => 'noopener,noreferrer'
}


0.48.1 2023-12-01 17:32:03 +0100 Tobias Oetiker <[email protected]>

- use CB_CFG_ as prefix ... this makes more sense than CM_CB
Expand Down
2 changes: 1 addition & 1 deletion lib/CallBackery.pm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use CallBackery::Plugin::Doc;
use CallBackery::Database;
use CallBackery::User;

our $VERSION = '0.48.2';
our $VERSION = '0.49.0';

=head2 config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ qx.Class.define("callbackery.ui.plugin.Action", {
case 'print':
this._print(data.content);
break;
case 'openLink':
const link = document.createElement('a');
link.href = data.url;
link.target = data.target || '_blank';
link.rel = data.rel || 'noopener noreferrer';
document.body.appendChild(link);
link.click();
link.remove();
break;
case 'reloadStatus':
case 'reload':
break;
Expand Down

0 comments on commit bc5f5e8

Please sign in to comment.