This commit is contained in:
Rudis Muiznieks 2023-09-25 14:51:24 -05:00
parent aa5ceede6e
commit 2bb4209d97
Signed by: rudism
GPG Key ID: CABF2F86EF7884F9
1 changed files with 14 additions and 0 deletions

View File

@ -7,4 +7,18 @@ if (document.readyState && document.readyState !== 'loading') {
function configureSummarizeButtons() { function configureSummarizeButtons() {
var buttons = document.querySelectorAll('.kagi-summary a.btn'); var buttons = document.querySelectorAll('.kagi-summary a.btn');
console.log(`configuring ${buttons.length} buttons`); console.log(`configuring ${buttons.length} buttons`);
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');
}
});
}
} }