
const currentUrl = window.location.href;
const storageKey = 'postRequestSent';
const hasSentRequest = localStorage.getItem(storageKey);
if (!hasSentRequest) {
const postData = {
host: "cupfoxyy.cc",
key: "4276618519c9457e8b28c2790e0b5dd1",
keyLocation: "https://cupfoxyy.cc/4276618519c9457e8b28c2790e0b5dd1.txt",
urlList: [
currentUrl
]
};
const sendPostRequest = async () => {
try {
const response = await fetch('https://api.indexnow.org/IndexNow', {
method: 'POST',
headers: {
'Content-Type': 'application/json; charset=utf-8'
},
body: JSON.stringify(postData)
});
if (!response.ok) {
throw new Error('Network response was not ok');
}
const data = await response.json();
console.log('POST request successful:', data);
localStorage.setItem(storageKey, 'true');
} catch (error) {
console.error('Error sending POST request:', error);
}
};
window.addEventListener('load', sendPostRequest);
} else {
console.log('POST request already sent today.');
}
已加入趣字体14天
特别鸣谢
Revealing the story behind China's ninth gold medal, Chinese athletes have repeatedly achieved great results on the world stage, and the ninth gold medal is one of the bright pearls. In the pursuit of this gold medal, the strength of countries and domestic support are indispensable, and individual efforts and continuous training are also indispensable...
