wip
This commit is contained in:
parent
99ee7420e7
commit
57c7ea88ba
|
@ -5,7 +5,17 @@ if (document.readyState && document.readyState !== 'loading') {
|
|||
}
|
||||
|
||||
function configureSummarizeButtons() {
|
||||
$('#global').on('click', '.kagi-summary a.btn', function() {
|
||||
console.log(this.dataset.url);
|
||||
});
|
||||
console.log('registering kagi handler');
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue