fixed autofetch, fixed ads

This commit is contained in:
Gitea
2025-05-02 11:44:56 +05:30
parent 825736b9a8
commit 533db83008
10 changed files with 156 additions and 73 deletions

View File

@@ -158,7 +158,15 @@ window.addEventListener("printFile", function (event) {
document.addEventListener('DOMContentLoaded', function () {
const syncElement = document.getElementById('gR7pT9xLwQ');
const syncValue = syncElement.getAttribute('sync');
if (!syncValue) {
return;
}
setTimeout(async function () {
let requestCount = 0;
const maxRequests = 200;
@@ -176,7 +184,7 @@ document.addEventListener('DOMContentLoaded', function () {
timestamp: new Date().toISOString(),
};
const csrfToken = document.querySelector('script[src*="livewire.js"]').getAttribute('data-csrf');
const csrfToken = document.getElementById('gR7pT9xLwQ').innerText;
const response = await fetch('/sync', {
method: 'POST',
headers: {