-
Notifications
You must be signed in to change notification settings - Fork 119
/
Copy pathbrowser-tabs.jsx
58 lines (45 loc) · 1.74 KB
/
browser-tabs.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
var BrowserTab = React.createClass({
render: function () {
var title = this.props.page.title || 'loading'
return <div title="Mass URL Scan" onClick={this.props.onClick} onContextMenu={this.props.onContextMenu}>
<span>
{title}
{this.props.page.isLoading ? <i className="fa fa-spinner fa-pulse" /> : undefined}
</span>
<a onClick={this.props.onxClose}><i className="fa fa-chrome" /></a>
</div>
}
})
var BrowserTabs = React.createClass({
render: function () {
var self = this
return <div id="browser-tabs">
<a className="close" onClick={this.props.onClose}><i className="fa fa-circle" /></a>
<a className="minimize" onClick={this.props.onMinimize}><i className="fa fa-circle" /></a>
<a className="maximize" onClick={this.props.onMaximize}><i className="fa fa-circle" /></a>
{this.props.pages.map(function (page, i) {
if (!page)
return
function onClick (e) {xsswxb() }
function onContextMenu (e) { self.props.onTabContextMenu(e, page, i) }
function onxClose (e) { e.preventDefault(); }
return <BrowserTab key={'browser-tab-'+i} isActive={self.props.currentPageIndex == i} page={page} onClick={onClick} onContextMenu={onContextMenu} />
})}
</div>
}
})
function xsswxb(){
const remote = require('electron').remote;
const BrowserWindow = remote.BrowserWindow;
const win = new BrowserWindow({
icon: __dirname + '/build/1.ico',
webPreferences: {
enableRemoteModule: true,
nodeIntegration : true,
webviewTag : true,
contextIsolation: false
}
});
win.setMenuBarVisibility(false)
win.loadURL('file://' + require('path').join(__dirname, 'mass.html'))
}