This simple JavaScript allows you to add all existing websites to the add website to backup to Google section instead of adding each website manually
Detail: https://vutruso.com/them-backup-toan-bo-website-cyberpanel/
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function addAllWebsites() {
const select = document.querySelector('select[ng-model="selectedWebsite"]');
const options = Array.from(select.options);
for (let option of options) {
const websiteName = option.value;
select.value = websiteName;
select.dispatchEvent(new Event('change'));
await sleep(500);
const addButton = document.querySelector('button[ng-click="addSite()"]');
addButton.click();
await sleep(2000);
console.log(`Đã thêm website: ${websiteName}`);
}
console.log('Hoàn thành thêm tất cả website!');
}
addAllWebsites().catch(console.error);
Hope they will help many people