clean up console

This commit is contained in:
syuilo 2025-03-20 15:15:46 +09:00
parent 6a90b7e04b
commit fd3e28812e
3 changed files with 20 additions and 22 deletions

View File

@ -33,13 +33,11 @@ const canvasPromise = new Promise<WorkerMultiDispatch | HTMLCanvasElement>(resol
Math.min(navigator.hardwareConcurrency - 1, 4), Math.min(navigator.hardwareConcurrency - 1, 4),
); );
resolve(workers); resolve(workers);
if (_DEV_) console.log('WebGL2 in worker is supported!');
} else { } else {
const canvas = document.createElement('canvas'); const canvas = document.createElement('canvas');
canvas.width = 64; canvas.width = 64;
canvas.height = 64; canvas.height = 64;
resolve(canvas); resolve(canvas);
if (_DEV_) console.log('WebGL2 in worker is not supported...');
} }
testWorker.terminate(); testWorker.terminate();
}); });

View File

@ -300,24 +300,26 @@ export async function common(createVue: () => App<Element>) {
removeSplash(); removeSplash();
//#region Self-XSS 対策メッセージ //#region Self-XSS 対策メッセージ
console.log( if (!_DEV_) {
`%c${i18n.ts._selfXssPrevention.warning}`, console.log(
'color: #f00; background-color: #ff0; font-size: 36px; padding: 4px;', `%c${i18n.ts._selfXssPrevention.warning}`,
); 'color: #f00; background-color: #ff0; font-size: 36px; padding: 4px;',
console.log( );
`%c${i18n.ts._selfXssPrevention.title}`, console.log(
'color: #f00; font-weight: 900; font-family: "Hiragino Sans W9", "Hiragino Kaku Gothic ProN", sans-serif; font-size: 24px;', `%c${i18n.ts._selfXssPrevention.title}`,
); 'color: #f00; font-weight: 900; font-family: "Hiragino Sans W9", "Hiragino Kaku Gothic ProN", sans-serif; font-size: 24px;',
console.log( );
`%c${i18n.ts._selfXssPrevention.description1}`, console.log(
'font-size: 16px; font-weight: 700;', `%c${i18n.ts._selfXssPrevention.description1}`,
); 'font-size: 16px; font-weight: 700;',
console.log( );
`%c${i18n.ts._selfXssPrevention.description2}`, console.log(
'font-size: 16px;', `%c${i18n.ts._selfXssPrevention.description2}`,
'font-size: 20px; font-weight: 700; color: #f00;', 'font-size: 16px;',
); 'font-size: 20px; font-weight: 700; color: #f00;',
console.log(i18n.tsx._selfXssPrevention.description3({ link: 'https://misskey-hub.net/docs/for-users/resources/self-xss/' })); );
console.log(i18n.tsx._selfXssPrevention.description3({ link: 'https://misskey-hub.net/docs/for-users/resources/self-xss/' }));
}
//#endregion //#endregion
return { return {

View File

@ -69,13 +69,11 @@ const canvasPromise = new Promise<WorkerMultiDispatch | HTMLCanvasElement>(resol
Math.min(navigator.hardwareConcurrency - 1, 4), Math.min(navigator.hardwareConcurrency - 1, 4),
); );
resolve(workers); resolve(workers);
if (_DEV_) console.log('WebGL2 in worker is supported!');
} else { } else {
const canvas = document.createElement('canvas'); const canvas = document.createElement('canvas');
canvas.width = 64; canvas.width = 64;
canvas.height = 64; canvas.height = 64;
resolve(canvas); resolve(canvas);
if (_DEV_) console.log('WebGL2 in worker is not supported...');
} }
testWorker.terminate(); testWorker.terminate();
}); });