This commit is contained in:
Rudis Muiznieks 2023-09-25 16:10:23 -05:00
parent 4618a938f7
commit 0a9efcff8b
Signed by: rudism
GPG Key ID: CABF2F86EF7884F9
1 changed files with 6 additions and 1 deletions

View File

@ -5,7 +5,6 @@ if (document.readyState && document.readyState !== 'loading') {
}
function configureSummarizeButtons() {
console.log(window.context);
document.getElementById('global').addEventListener('click', function(e) {
for (var target = e.target; target && target != this; target = target.parentNode) {
if (target.matches('.kagi-summary a.btn')) {
@ -59,4 +58,10 @@ function summarizeButtonClick(button) {
container.classList.add('alert-error');
containter.innerHTML = errorMsg;
}
request.setRequestHeader('Content-Type', 'application/json');
request.send(JSON.stringify({
ajax: true,
_csrf: context.csrf
}));
}