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