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

@@ 296-316 (lines=21) @@
293
	});
294
}
295
296
function shieldMix(addr) {
297
	let newAddr = "";
298
299
	for (let i = 0; i < 16; i++) {
300
		switch (addr.charAt(i)) {
301
			case '1':
302
				newAddr += "1iIlL".charAt(Math.floor(Math.random() * 5));
303
				break;
304
			case '0':
305
				newAddr += "0oO".charAt(Math.floor(Math.random() * 3));
306
				break;
307
			case 'w':
308
				newAddr += "VvWw".charAt(Math.floor(Math.random() * 4));
309
				break;
310
			default:
311
				newAddr += (Math.random() > 0.5) ? addr.charAt(i) : addr.charAt(i).toUpperCase();
312
		}
313
	}
314
315
	return newAddr;
316
}
317
318
function addAddress(num) {
319
	const addrTable = document.getElementById("tbl_addrs");