This commit is contained in:
Rudis Muiznieks 2023-09-25 14:57:58 -05:00
parent 3364ff1640
commit 99ee7420e7
Signed by: rudism
GPG Key ID: CABF2F86EF7884F9
1 changed files with 3 additions and 16 deletions

View File

@ -5,20 +5,7 @@ if (document.readyState && document.readyState !== 'loading') {
} }
function configureSummarizeButtons() { function configureSummarizeButtons() {
var buttons = document.querySelectorAll('.kagi-summary a.btn'); $('#global').on('click', '.kagi-summary a.btn', function() {
console.log(`configuring ${buttons.length} buttons`); console.log(this.dataset.url);
for (var i = 0; i < buttons.length; i++) {
let button = buttons[i];
let url = button.dataset.url;
button.addEventListener('click', function(e) {
e.preventDefault();
e.stopPropagation();
if (url) {
console.log(url);
} else {
console.log('no url');
}
}); });
}
} }