node-webkit-external-linker
A plugin for node-webkit which forces all external links to open in the user's default browser outside your app.
Installation
Either download the file from here or use bower:
bower install node-webkit-external-linker.js
Initialization
Include the file in your node-webkit app:
<script>
global.window = window;
</script>
<script src='bower_components/node-webkit-external-linker.js/node-webkit-external-linker.js'></script>
Usage
Once the script is loaded, all external links will automatically be opened in the user's default browser.
The script scans for:
rel='external'
target='_blank'
target='_top'
- Links beginning with
http
Links not meeting that criteria are assumed to not be external links.
Override
You can override this behavior by specifying target='_self'
in your links.
License
All original code in this library is licensed under the Creative Commons Attribution 4.0 International License. Commercial and noncommercial use is permitted with attribution.