Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
webpage_recorder
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
胡斌
8 years ago
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
477b3cc3d2cd45de585b75acde267a99fa61fd8b
477b3cc3
1 parent
3a654da5
add subarg,use -u to input url
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
27 行增加
和
4 行删除
main.js
package.json
main.js
查看文件 @
477b3cc
const
{
app
,
BrowserWindow
}
=
require
(
'electron'
)
const
{
app
,
BrowserWindow
}
=
require
(
'electron'
);
var
subarg
=
require
(
'subarg'
);
var
argv
=
subarg
(
process
.
argv
.
slice
(
2
));
if
(
argv
.
v
||
argv
.
version
)
{
console
.
log
(
'electron v'
+
process
.
versions
.
electron
);
console
.
log
(
'chrome v'
+
process
.
versions
.
chrome
);
return
app
.
quit
();
}
if
(
argv
.
d
)
{
var
args
=
"args: "
;
for
(
var
i
in
argv
)
{
args
+=
i
+
" = "
+
argv
[
i
]
+
"\n"
;
}
console
.
log
(
args
);
}
if
(
!
argv
.
u
){
console
.
log
(
"you must input the web url to record with : -u "
);
return
app
.
quit
();
}
app
.
disableHardwareAcceleration
()
...
...
@@ -9,10 +31,10 @@ app.once('ready', () => {
offscreen
:
true
}
})
win
.
loadURL
(
'http://github.com'
)
win
.
loadURL
(
argv
.
u
)
var
now
=
Date
.
now
()
win
.
webContents
.
on
(
"paint"
,
function
(
event
,
dirty
,
image
){
console
.
log
(
"painting"
,
...
...
package.json
查看文件 @
477b3cc
...
...
@@ -14,7 +14,8 @@
"author"
:
"hubin"
,
"license"
:
"MIT"
,
"dependencies"
:
{
"electron"
:
"^1.6.11"
"electron"
:
"^1.6.11"
,
"subarg"
:
"^1.0.0"
},
"devDependencies"
:
{
"electron-packager"
:
"^8.7.2"
...
...
请
注册
或
登录
后发表评论