V.AISTUDIO / CHECK_FIX.js
bep40's picture
Upload CHECK_FIX.js
083c5bb verified
Raw
History Blame
2.08 kB
/**
* V.AI STUDIO - Excel Fix Checker
* Chạy trong console (F12) để xác nhận fix đã áp dụng
*/
(function() {
'use strict';
var results = {
blobPatched: !!window.__VAI_REVOKE_PATCHED,
fixLoaded: !!window.VAI_FIX,
excelJsLoaded: typeof ExcelJS !== 'undefined',
registryExists: !!window.__VAI_BLOB_REGISTRY
};
console.log('%c[VAI FIX CHECKER] Kết quả:', 'color: #003f62; font-weight: bold; font-size: 14px');
if (results.blobPatched) {
console.log('%c✅ URL.revokeObjectURL đã được patch', 'color: #217346; font-weight: bold');
} else {
console.log('%c❌ URL.revokeObjectURL CHƯA patch', 'color: #dc3545; font-weight: bold');
}
if (results.fixLoaded) {
console.log('%c✅ VAI_FIX module đã load', 'color: #217346; font-weight: bold');
} else {
console.log('%c❌ VAI_FIX module CHƯA load', 'color: #dc3545; font-weight: bold');
}
if (results.registryExists) {
console.log('%c✅ Blob Registry tồn tại', 'color: #217346; font-weight: bold');
} else {
console.log('%c❌ Blob Registry CHƯA tồn tại', 'color: #dc3545; font-weight: bold');
}
if (results.excelJsLoaded) {
console.log('%c✅ ExcelJS đã load', 'color: #217346; font-weight: bold');
} else {
console.log('%c⚠️ ExcelJS CHƯA load - đợi 2-3s', 'color: #f59e0b; font-weight: bold');
}
// Test download capability
if (typeof window.exportDeliveryExcel === 'function' || typeof window.VAI_FIX !== 'undefined') {
console.log('%c✅ exportDeliveryExcel đã sẵn sàng', 'color: #217346; font-weight: bold');
}
var allGood = results.blobPatched && results.fixLoaded;
if (allGood) {
alert('✅ TẤT CẢ FIX ĐÃ HOẠT ĐỘNG!\n\nBạn có thể tải Excel bao nhiêu lần tùy thích.');
} else {
alert('⚠️ Chưa áp dụng đủ fix. Hãy dùng bookmarklet hoặc chèn script tag.');
}
return results;
})();