web/res/js/nwjs.js

(开头部分) 7KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/**
*	createname:雨中磐石
*	homeurl:http://www.rockoa.com/
*	Copyright (c) 2016 rainrock (xh829.com)
*	Date:2016-01-01
*/
var nwjs={
	init:function(){
		this.nw = nwjsgui;
		if(!this.nw)return;
		this.fs  = require('fs');
		this.win = nwjsgui.Window.get();
	},
	serverdata:function(str){
		
	},
	createtray:function(tls, lx){
		if(!this.nw)return;
		var icon = 'images/logo.png';
		if(lx==0)icon='images/logo_hui.png';
		var tray = new nwjsgui.Tray({ title:tls, icon: icon});
		tray.tooltip = tls;
		var menu = new nwjsgui.Menu();
		menu.append(new nwjsgui.MenuItem({label: '打开窗口',click:function(){
			nwjs.winshow();
		}}));
		this.closebool = false;
		menu.append(new nwjsgui.MenuItem({label: '退出',click:function(){
			nwjs.closebool = true;
			try{bodyunload();js.onunload();}catch(e){}
			nw.App.quit();
		}}));
		
		tray.menu 	= menu;
		
		tray.on('click',function(){
			nwjs.winshow();
		});
		
		this.tray = tray;
		
		this.win.removeAllListeners('close');
		this.win.on('close',function(){
			if(nwjs.closebool){
				try{bodyunload();js.onunload();}catch(e){}
				nw.App.quit();
				//nw.Window.get().close(true);
			}else{
				nwjs.win.hide();
			}
		});
		
		if(lx==0)return;
		var kjj=js.getoption('kuaijj','Q');
		this.addShortcut(kjj);
		this.addfile();
		var llq = navigator.userAgent.toLowerCase();
		try{if(llq.indexOf('windows nt 5')<0)this.udpserver();}catch(e){}
	},
	addShortcut:function(v){
后面还有 213 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。