node-webkit

How to print Node WebKit version

…衆ロ難τιáo~ 提交于 2019-12-07 04:18:49
问题 If I wanted to check which Node WebKit version I'm using, how would I do that from a command line? 回答1: To know the version of node-webkit in app so you can determine whether certain APIs are available, to get it you can use: process.versions['node-webkit'] And to quickly know the node-webkit's version you are using now, you can type nw:version in the toolbar, then node-webkit would print the versions like: node-webkit v0.3.5 node.js v0.8.14 If you are using Node Webkit Builder then use

App window restore on keypress

拈花ヽ惹草 提交于 2019-12-07 00:51:42
In my app I have added a functionality to minimize app window to system tray on keypress (on ESC or Pause/Break buttons press). So when pressing them the window get minimized. Is there a way to add functionality to restore app window on certain keypress (even if other application will be currently active)? For example I press Pause and the window is minimized. I press Pause and the app window is restored. Here is the solution extracted from node-webkit wiki : // Load native UI library. var gui = require('nw.gui'); var option = { key: "Ctrl+Shift+A", active: function() { console.log("Global

javascript统一世界?

旧时模样 提交于 2019-12-06 23:59:52
到微信关注我 今天facebook将react native框架的源码开源,瞬间火得一塌糊涂,目前github上的star已经快7000了。javascript作为这个框架的开发使用语言又一次出现在人们面前。这几年javascript这们神奇的语言现在已经被使用到软件开发的方方面面,让人感觉javascript都快统一世界了。今天这篇文章就看看用javascript究竟都能干些什么。 1.web开发 javascript是1995年由Netscape公司的Brendan Eich,在网景导航者浏览器上首次设计实现而成,所以javascript可以说是为web而生。而在web开发上,javascript也一直在进步。先是jquery成为大众基础库,然后又有extjs这种重型武器。随着js越来越庞大,requirejs,seajs等模块加载器出现 。这两年mvvm概念兴起,各种框架也是满天飞,angularjs,reactjs,polymer等框架也是频频出来,很多前端程序员都无所适从,不知道该用什么了。 2.服务器端开发 除了镇守住web这个阵地以外,javascript也积极的在服务器端拓展阵营。2009年2月,Ryan Dahl在博客上宣布准备基于V8创建一个轻量级的Web服务器并提供一套库,从此nodejs一发不可收拾的火了起来

node-webkit enabling flag touch screen

帅比萌擦擦* 提交于 2019-12-06 12:06:58
问题 I use Ubuntu 14.04 LTS. If I use Chromium 34.0.1847.116 to enable touch events on my web app I have to: start chromium with --enable-touch-events --enable-pinch set to enabled the flag "Enable touch events" using chrome://flags I'm looking to enable theses touch events on node-webkit . I'm using 64 bit version of node-webkit v0.9.2 that uses chromium 32.0.1700.107 . If I add the following key to package.json , it does not work. "chromium-args" : "--enable-touch-events --enable-pinch" touch

Meteor leaderboard app on node-webkit

纵然是瞬间 提交于 2019-12-06 11:27:42
问题 I am trying to get the meteor leaderboard app to run on Node-Webkit. I have demeteorized it and compressed it to a .nw file but when I drop it in. I get errors: Invalid Package There is no 'package.json' in the package, please make sure the 'package.json' is in the root of the package. I have read on various thread but nothing clear yet. It seems like the demeteorized app needs to be restructured. Also need to figure out how to run the server [Locally/DDP]. Edited: P.S. I am using the

Demeteorizer with node-webkit

别说谁变了你拦得住时间么 提交于 2019-12-06 10:59:35
问题 I'm trying to make a desktop application using meteor. Can I use Demeteorizer to convert it to a standard node.js app, then use ndoe-webkit to turn it into a desktop app? My problem with this is, how would the mongodb database still work? If this is not a valid option, is there any other way to do this? 回答1: Interesting idea. Demeteorizer will help you create a bundle that can be installed anywhere. You would then be able to use this on a desktop computer. There are a few things you need to

Nodewebkit app: hide cursor

无人久伴 提交于 2019-12-06 06:49:55
问题 I'm developing my web app with nodewebkit in fullscreen mode. It has to be used with touchscreen monitor. I've used CSS proprerty: html * { cursor: none; } In nodewebkit's manifest seems that nothing usefull is provided to remove cursor.. Problem is that cursor disappears only when it is moved the first time. How can I improve this behavior? 回答1: I've fixed the problem calling from script: document.body.style.cursor = 'none'; But I can't understand why doesn't work from css. 回答2: I think

Node-Webkit Facebook integration

扶醉桌前 提交于 2019-12-06 04:14:32
问题 I am building a newsreader-ish desktop app using node-webkit https://github.com/rogerwang/node-webkit which is basically server and client at the same time. My Problem with the facebook API is the following: i want the user of my app to login and present them their current wall-postings and the stuff like this. In addition, i have a couple of news-items from other sources, which should be like-able/share-able from this user. The whole app is a single-page JS (more exactly: coffeescript) thing

Is it possible to load chrome extension in node-webkit window

会有一股神秘感。 提交于 2019-12-06 03:10:55
问题 I am trying to make a node.js app using node-webkit . Is it possible to load a chrome extension in node-webkit window and make it appear as it appear in chrome browser I have gone through this but I am only able to understand that it can load NPAPI plugin. Is there a way to convert chrome extension to NPAPI plugin? 回答1: Loading Chrome extensions is supported now with '--load-extension' switch from Chromium. Previously, since node-webkit was based on Content Layer of Chromium, where there was

console.log() does not appear in my terminal (nwjs)

五迷三道 提交于 2019-12-06 02:51:20
问题 In my nwjs app, I load a _launch.js file from an HTML file: <html> <body> <script type="text/javascript" src="_launch.js"></script> </body> </html> And in my _launch.js file, I fire up the the Node processes I need for an express server and socketIO. var express = require('express'), app = express(), server = require('http').Server(app), io = require('socket.io')(server), gui = require('nw.gui'), __curDir = process.cwd(), //keep the logic for the IO connections separate ioServer = require(_