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,6 +300,7 @@ export async function common(createVue: () => App<Element>) {
removeSplash(); removeSplash();
//#region Self-XSS 対策メッセージ //#region Self-XSS 対策メッセージ
if (!_DEV_) {
console.log( console.log(
`%c${i18n.ts._selfXssPrevention.warning}`, `%c${i18n.ts._selfXssPrevention.warning}`,
'color: #f00; background-color: #ff0; font-size: 36px; padding: 4px;', 'color: #f00; background-color: #ff0; font-size: 36px; padding: 4px;',
@ -318,6 +319,7 @@ export async function common(createVue: () => App<Element>) {
'font-size: 20px; font-weight: 700; color: #f00;', '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();
}); });