Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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 );
});
}
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;
click: function() {
gui.Shell.openExternal('https://www.musicoin.org/faq');
}
}));
function NoFFMPEGExplanation(){
gui.Shell.openExternal("http://torrentv.github.io/noffmpeg")
}
Nunu.openWebpage = function(url)
{
if(Nunu.runningOnDesktop())
{
require("nw.gui").Shell.openExternal(url);
}
else
{
window.open(url);
}
};
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);
},
element.addEventListener('click', function(e) {
e.preventDefault();
gui.Shell.openExternal( this.href );
});
this.getAPIKey = function() {
gui.Shell.openExternal('http://steamcommunity.com/dev/apikey');
};
}, 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);
}
}
});
}
function open_external(url)
{
gui.Shell.openExternal(url);
return false;
}