Skip to content

dicksont/nwjs-osx-menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nwjs-osx-menu

npm version Bower version

Creates a default menu for your nw.js program on Mac OS X, thereby enabling functionality like Copy-and-Paste.

Background

Lack of ⌘C(copy) and ⌘V(paste) was making development difficult on nw.js. Originally, I had saved the code as a gist/snippet. But even this required copy and paste. I was getting tired of typing in this boilerplate every time, I ran my app. So I tried to find a better solution.

I checked to see if anyone has created module to address this problem. It appeared that no one had. I also checked, to see if code for this would make more sense in nw.js itself. It did not. It also probably will not.

So I went ahead and put together this solution on a Saturday. Enjoy!

##Usage

This is available as a npm module. Simply install with:

npm install nwjs-osx-menu

Call the module function passing in the window object:

require('nwjs-osx-menu')(window);

On Mac OS X, this call should add an Edit and a Window menu to the application menubar. On other platforms, this call should not modify the application state.

About

Creates a default menu for your nw.js program on Mac OS X, thereby enabling functionality like copy-and-paste.

Resources

License

Stars

Watchers

Forks

Packages

No packages published