Update main.js

Changed the code to be a 'white list' instead of 'black list'