Code Duplication    Length = 21-21 lines in 2 locations

original/main.js 1 location

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

modern/main.js 1 location

@@ 1098-1118 (lines=21) @@
1095
	});
1096
}
1097
1098
function shieldMix(addr) {
1099
	let newAddr = "";
1100
1101
	for (let i = 0; i < 16; i++) {
1102
		switch (addr.charAt(i)) {
1103
			case '1':
1104
				newAddr += "1iIlL".charAt(Math.floor(Math.random() * 5));
1105
				break;
1106
			case '0':
1107
				newAddr += "0oO".charAt(Math.floor(Math.random() * 3));
1108
				break;
1109
			case 'w':
1110
				newAddr += "VvWw".charAt(Math.floor(Math.random() * 4));
1111
				break;
1112
			default:
1113
				newAddr += (Math.random() > 0.5) ? addr.charAt(i) : addr.charAt(i).toUpperCase();
1114
		}
1115
	}
1116
1117
	return newAddr;
1118
}
1119
1120
function addAddress(num) {
1121
	const addrTable = document.getElementById("tbl_addrs");