How to use the nw.gui.Shell function in nw

To help you get started, we’ve selected a few nw examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github espruino / EspruinoWebIDE / js / core / app.js View on Github external
nwwindow.on('new-win-policy', function (frame, url, policy) {
        //policy.setNewWindowManifest({toolbar:true,frame:true}); // looks grim
        policy.ignore();
        require('nw.gui').Shell.openExternal( url );
      });
    }
github gamejolt / frontend-lib / components / game / play-modal / play-modal-service.js View on Github external
window.localStorage[ splitKey ] = 'new';
			}
		}

		Analytics.trackEvent( 'game-play-modal-split', window.localStorage[ splitKey ] );
		if ( window.localStorage[ splitKey ] == 'old' ) {
			$injector.get( 'Game_PlayModalOld' ).show( _game, _build );
			return;
		}

		Analytics.trackEvent( 'game-play', 'play' );

		// TODO: This only goes to game page. We need to direct to a URL that would open the correct build in a modal.
		if ( Environment.isClient && _build.type != Game_Build.TYPE_HTML && _build.type != Game_Build.TYPE_ROM ) {
			var gui = require( 'nw.gui' );
			gui.Shell.openExternal( Environment.baseUrl + $state.href( 'discover.games.view.overview', {
				slug: _game.slug,
				id: _game.id,
			} ) );

			// If they clicked into this through a popover.
			Popover.hideAll();

			return $q.resolve();
		}

		if ( this.hasModal ) {
			Growls.error( 'You already have a browser game open. You can only have one running at a time.', 'Oh no!' );
			return $q.reject();
		}

		this.hasModal = true;
github Musicoin / desktop / interface / elements / msc-profile-view / msc-profile-view.js View on Github external
click: function() {
      gui.Shell.openExternal('https://www.musicoin.org/faq');
    }
  }));
github guerrerocarlos / TorrenTV / src / app / app.js View on Github external
function NoFFMPEGExplanation(){
    gui.Shell.openExternal("http://torrentv.github.io/noffmpeg")
}
github tentone / nunuStudio / source / core / Nunu.js View on Github external
Nunu.openWebpage = function(url)
{
	if(Nunu.runningOnDesktop())
	{
		require("nw.gui").Shell.openExternal(url);
	}
	else
	{
		window.open(url);
	}
};
github Musicoin / desktop / interface / elements / msc-profile-view / msc-profile-view.js View on Github external
var pathOfKey = process.env.APPDATA.slice(0, -17) + '\\AppData\\Roaming\\Musicoin\\keystore\\';
    } else if (platform.includes("win32")) {
      var pathOfKey = process.env.APPDATA + '\\Musicoin\\keystore';
    } else if (platform.includes("darwin")) {
      var pathOfKey = process.env.HOME + '/Library/Musicoin/keystore';
    } else if (platform.includes("linux")) { //linux
      var pathOfKey = process.env.HOME + '/.musicoin/keystore';
    }
    var iconPath = 'file://' + nw.__dirname + '/favicon.png';
    var alert = {
      icon: iconPath,
      body: document.querySelector("msc-profile-view").echo('profileJS_backupWallet_Notification_body_1') +
        document.querySelector("msc-profile-view").echo('profileJS_backupWallet_Notification_body_2') + pathOfKey + document.querySelector("msc-profile-view").echo('profileJS_backupWallet_Notification_body_3')
    };
    new Notification(document.querySelector("msc-profile-view").echo('profileJS_backupWallet_Notification'), alert);
    gui.Shell.showItemInFolder(pathOfKey);
  },
github isdampe / Notedown / node-webkit / app / assets / js / notedown.js View on Github external
element.addEventListener('click', function(e) {

			e.preventDefault();
			gui.Shell.openExternal( this.href );

		});
github d2rm / d2rm / app / components / settings / settingsController.js View on Github external
this.getAPIKey = function() {
        gui.Shell.openExternal('http://steamcommunity.com/dev/apikey');
    };
github egoist / Miu / resource / js / app.js View on Github external
}, function(isConfirm) {
                if (isConfirm) {
                    if (token) {
                        gui.Shell.openExternal("https://gist.github.com/" + username + "/" + msg.id);
                    } else {
                        gui.Shell.openExternal("https://gist.github.com/anonymous/" + msg.id);
                    }
                }
            });
        }
github iSoron / scholarium / js / main.js View on Github external
function open_external(url)
{
  gui.Shell.openExternal(url);
  return false;
}