Download wp-calypso/desktop/app/app-handlers/protocol/index.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 432 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/desktop/app/app-handlers/protocol/index.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/desktop/app/app-handlers/protocol/index.js
-
curl -L -o index.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/desktop/app/app-handlers/protocol/index.js
432 Bytes
| const path = require( 'node:path' ); | |
| const { app } = require( 'electron' ); | |
| const Config = require( '../../lib/config' ); | |
| module.exports = function () { | |
| const protocol = Config.protocol; | |
| if ( process.defaultApp ) { | |
| if ( process.argv.length >= 2 ) { | |
| app.setAsDefaultProtocolClient( protocol, process.execPath, [ | |
| path.resolve( process.argv[ 1 ] ), | |
| ] ); | |
| } | |
| } else { | |
| app.setAsDefaultProtocolClient( protocol ); | |
| } | |
| }; | |