Download wp-calypso/apps/help-center/utils.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 427 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/apps/help-center/utils.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/apps/help-center/utils.js
-
curl -L -o utils.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/apps/help-center/utils.js
427 Bytes
| export const getEditorType = () => { | |
| if ( document.querySelector( '#editor .edit-post-layout' ) ) { | |
| return 'post'; | |
| } | |
| if ( document.querySelector( '#site-editor' ) ) { | |
| return 'site'; | |
| } | |
| if ( document.querySelector( '#widgets-editor' ) ) { | |
| return 'widgets'; | |
| } | |
| if ( document.querySelector( '#customize-controls .customize-widgets__sidebar-section.open' ) ) { | |
| return 'customize-widgets'; | |
| } | |
| return undefined; | |
| }; | |