Code Duplication    Length = 21-21 lines in 2 locations

original/main.js 1 location

@@ 425-445 (lines=21) @@
422
	});
423
}
424
425
function shieldMix(addr) {
426
	let newAddr = "";
427
428
	for (let i = 0; i < 24; i++) {
429
		switch (addr.charAt(i)) {
430
			case '1':
431
				newAddr += "1iIlL".charAt(Math.floor(Math.random() * 5));
432
				break;
433
			case '0':
434
				newAddr += "0oO".charAt(Math.floor(Math.random() * 3));
435
				break;
436
			case 'w':
437
				newAddr += "VvWw".charAt(Math.floor(Math.random() * 4));
438
				break;
439
			default:
440
				newAddr += (Math.random() > 0.5) ? addr.charAt(i) : addr.charAt(i).toUpperCase();
441
		}
442
	}
443
444
	return newAddr;
445
}
446
447
function addAddress(num) {
448
	const addrTable = document.getElementById("tbody_opt_addr");

modern/main.js 1 location

@@ 312-332 (lines=21) @@
309
	});
310
}
311
312
function shieldMix(addr) {
313
	let newAddr = "";
314
315
	for (let i = 0; i < 16; i++) {
316
		switch (addr.charAt(i)) {
317
			case '1':
318
				newAddr += "1iIlL".charAt(Math.floor(Math.random() * 5));
319
				break;
320
			case '0':
321
				newAddr += "0oO".charAt(Math.floor(Math.random() * 3));
322
				break;
323
			case 'w':
324
				newAddr += "VvWw".charAt(Math.floor(Math.random() * 4));
325
				break;
326
			default:
327
				newAddr += (Math.random() > 0.5) ? addr.charAt(i) : addr.charAt(i).toUpperCase();
328
		}
329
	}
330
331
	return newAddr;
332
}
333
334
function addAddress(num) {
335
	const addrTable = document.getElementById("tbl_addrs");