Skip to content

Commit

Permalink
修复BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
Ceyase committed Jun 3, 2024
1 parent bd0d7a9 commit 4f5489e
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions tool/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,25 @@
"https://manual.gamemaker.io/beta/en/",
"https://manual.gamemaker.io/monthly/en/",
];
async function checkAndRedirect(url) {
try {
const response = await fetch(url, { mode: 'no-cors' });
const searchParams = new URLSearchParams(window.location.search);
if (response.type === 'opaque') {
if(searchParams.get('path') == null){
window.location.href = url;
}else{
window.location.href = url + searchParams.get('path');
async function checkAndRedirect(urlList) {
for(const url of urlList){
try {
const response = await fetch(url, { mode: 'no-cors' });
const searchParams = new URLSearchParams(window.location.search);
if (response.type === 'opaque') {
if(searchParams.get('path') == null){
window.location.href = url;
}else{
window.location.href = url + searchParams.get('path');
}
sleep(1000);
}
} catch (error) {
console.error('Error:', error);
}
} catch (error) {
console.error('Error:', error);
}
}
for(const url of urlList){
await checkAndRedirect(url);
}
checkAndRedirect(urlList);
</script>

请稍作等待,正在重定向到手册。

0 comments on commit 4f5489e

Please sign in to comment.