refactor things from main.js to shared.js

Conflicts:
	main.js
parseHTML: fix whitebox selector

Conflicts:
	shared.js
parseHTML: fix group wilting count regex
fix a bug where new groups regarded as disabled
opts: use Memrise.getDB