This commit is contained in:
Rudis Muiznieks 2023-09-25 15:03:36 -05:00
parent 99ee7420e7
commit 57c7ea88ba
Signed by: rudism
GPG Key ID: CABF2F86EF7884F9
1 changed files with 13 additions and 3 deletions

View File

@ -5,7 +5,17 @@ if (document.readyState && document.readyState !== 'loading') {
} }
function configureSummarizeButtons() { function configureSummarizeButtons() {
$('#global').on('click', '.kagi-summary a.btn', function() { console.log('registering kagi handler');
console.log(this.dataset.url); document.getElementById('global').addEventListener('click', function(e) {
}); console.log('kagi handler triggered');
for (var target = e.target; target && target != this; target = target.parentNode) {
if (target.matches('.kagi-summary a.btn')) {
e.preventDefault();
e.stopPropagation();
console.log('kagi button clicked', target.dataset.url);
break;
}
}
console.log('kagi handler ignoring click');
}, false);
} }