Project: dom
Task (easy): Click button dir to append a dir element (class 'entry dir') in the entries panel. A dir has an unique id attribute, random dirname as its text content and a child element (class 'dir-content'). Click dir to show/hide dir-content by add/remove class 'open'. Use DOM API as much as possible. Save codes to 'common/dir.js' imported by 'index.js'.