# open-in-browser **Repository Path**: sdk-apis/open-in-browser ## Basic Information - **Project Name**: open-in-browser - **Description**: open-in-browser - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-09-02 - **Last Updated**: 2024-09-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Open in Browser Atom.io Package ## 介绍 用于在atom之类的软件,打开 markdown之类的文件 A very simple Open in Browser Atom.io Package. This allows you to right click and have a menu that will open the current file in your default program. That opens that extension. **Files will open in your default browser or application**. ## 安装路径 只需要复制到相应的目录 本地项目的默认的安装路径 $HOME/.<软件的名称>/packages/open-in-browser 例如对于pulsar ```bash $HOME/.pulsar/packages/open-in-browser ``` 例如对于atom ```bash $HOME/.atom/packages/open-in-browser ``` ## v 4.9.2 针对 lib/open-in-browser.coffee 增加了代码的错误捕捉,从而可以正常打开markdown的文件 ```coffee openTreeView: ({target}) -> console.log "目标:", target console.log "数据集:", target.dataset console.log "路径:", target.dataset?.path if target.dataset?.path @open target.dataset.path else atom.notifications.addError "无效的文件路径", detail: "无法从树视图获取文件路径", dismissable: true # # open: (filePath) -> console.log "正在打开文件:", filePath if filePath opn(filePath).catch (error) -> atom.notifications.addError error.toString(), detail: error.stack or '', dismissable: true console.error error else atom.notifications.addError "无效的文件路径", detail: "文件路径为空或未定义", dismissable: true ``` ## v 0.5.0 - Huge thanks to [ldez](https://github.com/ldez) for the contributions on pull request [#34](https://github.com/magbicaleman/open-in-browser/pull/34) which solves a few issues some users were having. ## v 0.4.7 * "Open In Browser" context menu, from tree view or text editor pane, should be functional when nuclide package is installed * Should Fix * [Not compatible with nuclide-file-tree :(](https://github.com/magbicaleman/open-in-browser/issues/29) * by @aiboy ## v 0.4.6 * "Open In Browser" context menu, from tree view or text editor pane, should be functional * Should Fix * [Failed to activate the open-in-browser package](https://github.com/magbicaleman/open-in-browser/issues/17) ## v 0.4.5 * Had to apply fixes differently because the pull-request was using outdated version. * [fix deprecations](https://github.com/andya9/open-in-browser/commit/de3e796bd6f26e3e87c43ac56664b58f7558c93e) * by @andya9 ## v 0.4.4 * [fixed deprecation of stylesheets folder](https://github.com/magbicaleman/open-in-browser/pull/14) * by @andya9 ## v 0.4.3 * [Fixes deprecation warnings and some indentations](https://github.com/magbicaleman/open-in-browser/pull/12) * by @zimme ## v 0.4.2 * Fixes "Open In Browser" not showing up in the workspace context menu ## v 0.4.0 Update by "MetaMemoryT" Now able to right click on tree-view and select "Open in browser" Update by "mesosteros" Replace editor class with `atom-text-editor` tag. Shortcut was conflicting with meteor developers who use Ctrl-Alt-M in Meteor.js packages for Atom, so use Ctrl-Alt-Q instead.