fix: detecting when ctrl is pressed.
to enable users to open link in another tab.
This commit is contained in:
parent
47551b47d5
commit
4d617bfffb
@ -43,9 +43,13 @@ Liberapay.init = function() {
|
||||
Liberapay.s3_uploader_init();
|
||||
Liberapay.stripe_init();
|
||||
|
||||
$('div[href]').css('cursor', 'pointer').click(function() {
|
||||
location.href = this.getAttribute('href');
|
||||
return false;
|
||||
$('div[href]').css('cursor', 'pointer').click(function(event) {
|
||||
let url = this.getAttribute('href');
|
||||
if(event.ctrlKey) {
|
||||
window.open(url);
|
||||
} else {
|
||||
location.href = url;
|
||||
}
|
||||
});
|
||||
|
||||
$('.navbar .dropdown-hover').removeClass('dropdown-hover');
|
||||
|
Loading…
x
Reference in New Issue
Block a user