update codes, rearrange jscript for dropdown buttons in flashcards tab