Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-webkit-external-linker.js

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-webkit-external-linker.js

Forces all external links to open in regular browser windows in node-webkit apps.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

node-webkit-external-linker Gittip

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; // needed by externally linked scripts
</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.

Keywords

FAQs

Package last updated on 08 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc