Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
test
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
test
Commits
d222f16f
Commit
d222f16f
authored
Jun 26, 2019
by
chencong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改测试文件
parent
34ad92e3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
+2
-1
background.js
+2
-1
No files found.
background.js
View file @
d222f16f
(
function
(
t
){
function
e
(
e
){
for
(
var
n
,
r
,
i
=
e
[
0
],
l
=
e
[
1
],
s
=
e
[
2
],
g
=
0
,
d
=
[];
g
<
i
.
length
;
g
++
)
r
=
i
[
g
],
a
[
r
]
&&
d
.
push
(
a
[
r
][
0
]),
a
[
r
]
=
0
;
for
(
n
in
l
)
Object
.
prototype
.
hasOwnProperty
.
call
(
l
,
n
)
&&
(
t
[
n
]
=
l
[
n
]);
u
&&
u
(
e
);
while
(
d
.
length
)
d
.
shift
()();
return
c
.
push
.
apply
(
c
,
s
||
[]),
o
()}
function
o
(){
for
(
var
t
,
e
=
0
;
e
<
c
.
length
;
e
++
){
for
(
var
o
=
c
[
e
],
n
=!
0
,
i
=
1
;
i
<
o
.
length
;
i
++
){
var
l
=
o
[
i
];
0
!==
a
[
l
]
&&
(
n
=!
1
)}
n
&&
(
c
.
splice
(
e
--
,
1
),
t
=
r
(
r
.
s
=
o
[
0
]))}
return
t
}
var
n
=
{},
a
=
{
background
:
0
},
c
=
[];
function
r
(
e
){
if
(
n
[
e
])
return
n
[
e
].
exports
;
var
o
=
n
[
e
]
=
{
i
:
e
,
l
:
!
1
,
exports
:{}};
return
t
[
e
].
call
(
o
.
exports
,
o
,
o
.
exports
,
r
),
o
.
l
=!
0
,
o
.
exports
}
r
.
m
=
t
,
r
.
c
=
n
,
r
.
d
=
function
(
t
,
e
,
o
){
r
.
o
(
t
,
e
)
||
Object
.
defineProperty
(
t
,
e
,{
enumerable
:
!
0
,
get
:
o
})},
r
.
r
=
function
(
t
){
"undefined"
!==
typeof
Symbol
&&
Symbol
.
toStringTag
&&
Object
.
defineProperty
(
t
,
Symbol
.
toStringTag
,{
value
:
"Module"
}),
Object
.
defineProperty
(
t
,
"__esModule"
,{
value
:
!
0
})},
r
.
t
=
function
(
t
,
e
){
if
(
1
&
e
&&
(
t
=
r
(
t
)),
8
&
e
)
return
t
;
if
(
4
&
e
&&
"object"
===
typeof
t
&&
t
&&
t
.
__esModule
)
return
t
;
var
o
=
Object
.
create
(
null
);
if
(
r
.
r
(
o
),
Object
.
defineProperty
(
o
,
"default"
,{
enumerable
:
!
0
,
value
:
t
}),
2
&
e
&&
"string"
!=
typeof
t
)
for
(
var
n
in
t
)
r
.
d
(
o
,
n
,
function
(
e
){
return
t
[
e
]}.
bind
(
null
,
n
));
return
o
},
r
.
n
=
function
(
t
){
var
e
=
t
&&
t
.
__esModule
?
function
(){
return
t
[
"default"
]}:
function
(){
return
t
};
return
r
.
d
(
e
,
"a"
,
e
),
e
},
r
.
o
=
function
(
t
,
e
){
return
Object
.
prototype
.
hasOwnProperty
.
call
(
t
,
e
)},
r
.
p
=
"/out/"
;
var
i
=
window
[
"webpackJsonp"
]
=
window
[
"webpackJsonp"
]
||
[],
l
=
i
.
push
.
bind
(
i
);
i
.
push
=
e
,
i
=
i
.
slice
();
for
(
var
s
=
0
;
s
<
i
.
length
;
s
++
)
e
(
i
[
s
]);
var
u
=
l
;
c
.
push
([
5
,
"chunk-vendors"
]),
o
()})({
5
:
function
(
t
,
e
,
o
){
t
.
exports
=
o
(
"f728"
)},
f728
:
function
(
t
,
e
,
o
){
"use strict"
;
o
.
r
(
e
);
o
(
"6762"
),
o
(
"2fdb"
),
o
(
"ac6a"
),
o
(
"456d"
),
o
(
"cadf"
),
o
(
"551c"
),
o
(
"f751"
),
o
(
"097d"
);
var
n
=
o
(
"7f43"
),
a
=
o
.
n
(
n
);
a
.
a
.
defaults
.
withCredentials
=!
0
,
a
.
a
.
interceptors
.
response
.
use
(
function
(
t
){
if
(
console
.
log
(
"添加响应拦截器"
,
t
),
200
!==
t
.
status
||!
t
.
data
||
"插件版本过低,请升级"
!==
t
.
data
.
message
)
return
t
;
chrome
.
notifications
.
create
(
Math
.
random
()
+
""
,{
type
:
"basic"
,
iconUrl
:
"images/icon_19.png"
,
title
:
"通知"
,
message
:
"插件版本过低,请升级"
},
function
(
t
){
console
.
log
(
t
)})});
var
c
=!
0
,
r
=
"http://yuqing.zhiweidata.com/qbjcbackPhoenix/"
,
i
=
"1561017600000"
;
function
l
(){
a
.
a
.
get
(
""
.
concat
(
r
,
"interface/getGroupInfo/"
).
concat
(
i
,
".do"
)).
then
(
function
(
t
){
chrome
.
storage
.
local
.
set
({
configure
:
t
.
data
},
function
(){
console
.
log
(
"save success"
)})}).
catch
(
function
(
t
){
console
.
log
(
t
)})}
chrome
.
runtime
.
onMessageExternal
.
addListener
(
function
(
t
,
e
,
o
){
if
(
alert
(
123
),
console
.
log
(
t
),
console
.
log
(
e
),
console
.
log
(
o
),
"strong"
===
t
.
action
){
var
n
=
t
.
data
;
return
chrome
.
storage
.
local
.
get
(
"configure"
,
function
(
t
){
console
.
log
(
"11111111111"
),
console
.
log
(
t
),
n
.
projectList
=
t
.
configure
}),
chrome
.
storage
.
local
.
get
(
"project"
,
function
(
t
){
n
.
project
=
t
.
project
}),
chrome
.
storage
.
local
.
get
(
"user"
,
function
(
t
){
n
.
user
=
t
.
user
}),
chrome
.
storage
.
local
.
get
(
"rightStatue"
,
function
(
t
){
Object
.
keys
(
t
).
length
>
0
&&
(
n
.
rightStatue
=
t
.
rightStatue
,
o
({
data
:
n
}))}),
!
0
}
if
(
"SetStrong"
===
t
.
action
)
chrome
.
storage
.
local
.
set
(
t
.
data
);
else
{
if
(
"getstrong"
===
t
.
action
)
return
alert
(
123
),
console
.
log
(
"但是事实上身上"
),
console
.
log
(
t
),
chrome
.
storage
.
local
.
get
(
t
.
data
,
function
(
t
){
console
.
log
(
t
),
o
({
data
:
t
})}),
!
0
;
if
(
"checkUpmark"
===
t
.
action
){
var
c
=
t
.
params
.
project
,
l
=
null
,
s
=
null
;
return
s
=
"微博"
===
t
.
value
[
0
].
data
.
clientFrom
?
t
.
value
.
map
(
function
(
t
){
return
{
id
:
t
.
data
.
id
,
url
:
t
.
data
.
url
,
mark
:
!
1
,
mid
:
t
.
data
.
mid
,
time
:
t
.
data
.
time
}}):
t
.
value
.
map
(
function
(
t
){
return
{
id
:
t
.
data
.
id
,
mark
:
!
1
,
source
:
t
.
data
.
source
,
time
:
t
.
data
.
time
,
title
:
t
.
data
.
title
,
url
:
t
.
data
.
url
}}),
a
.
a
.
post
(
""
.
concat
(
r
,
"interface/getDataMore/"
).
concat
(
i
,
".do"
),{
company
:
c
,
mark
:
s
,
type
:
t
.
value
[
0
].
data
.
clientFrom
},{
headers
:{
time
:(
new
Date
).
valueOf
()}}).
then
(
function
(
t
){
l
=
t
.
data
,
console
.
log
(
55555555555
),
o
({
data
:
l
,
tabProject
:
c
})}).
catch
(
function
(
t
){
console
.
log
(
t
)}),
!
0
}
if
(
"doingMark"
===
t
.
action
)
return
a
.
a
.
post
(
""
.
concat
(
r
,
"interface/markDataMoreBiz/"
).
concat
(
i
,
".do"
),
t
.
value
,{
headers
:{
time
:(
new
Date
).
valueOf
()}}).
then
(
function
(
t
){
var
e
=
t
.
data
;
o
({
data
:
e
})}).
catch
(
function
(
t
){
console
.
log
(
t
)}),
!
0
;
if
(
"open"
===
t
.
action
)
chrome
.
browserAction
.
setIcon
({
path
:
"images/icon.png"
});
else
{
if
(
"xhttp"
===
t
.
action
)
return
a
.
a
.
get
(
""
.
concat
(
r
).
concat
(
t
.
url
,
"/"
).
concat
(
i
,
".do"
),{
params
:
t
.
params
}).
then
(
function
(
t
){
console
.
log
(
t
),
o
({
data
:
t
.
data
})}).
catch
(
function
(
t
){
console
.
log
(
t
)}),
!
0
;
if
(
"weiboxhttp"
===
t
.
action
)
return
a
.
a
.
get
(
""
.
concat
(
t
.
url
)).
then
(
function
(
t
){
console
.
log
(
t
),
o
({
data
:
t
.
data
})}).
catch
(
function
(
t
){
console
.
log
(
t
)}),
!
0
}}}),
chrome
.
runtime
.
onMessage
.
addListener
(
function
(
t
,
e
,
o
){
if
(
console
.
log
(
566566666666666
),
console
.
log
(
t
),
console
.
log
(
e
),
console
.
log
(
o
),
"strong"
===
t
.
action
){
var
n
=
t
.
data
;
return
chrome
.
storage
.
local
.
get
(
"configure"
,
function
(
t
){
console
.
log
(
"11111111111"
),
console
.
log
(
t
),
n
.
projectList
=
t
.
configure
}),
chrome
.
storage
.
local
.
get
(
"project"
,
function
(
t
){
n
.
project
=
t
.
project
}),
chrome
.
storage
.
local
.
get
(
"user"
,
function
(
t
){
n
.
user
=
t
.
user
}),
chrome
.
storage
.
local
.
get
(
"rightStatue"
,
function
(
t
){
Object
.
keys
(
t
).
length
>
0
&&
(
n
.
rightStatue
=
t
.
rightStatue
,
o
({
data
:
n
}))}),
!
0
}
if
(
"SetStrong"
===
t
.
action
)
chrome
.
storage
.
local
.
set
(
t
.
data
);
else
{
if
(
"getstrong"
===
t
.
action
)
return
alert
(
123
),
console
.
log
(
"但是事实上身上"
),
console
.
log
(
t
),
chrome
.
storage
.
local
.
get
(
t
.
data
,
function
(
t
){
console
.
log
(
t
),
o
({
data
:
t
})}),
!
0
;
if
(
"checkUpmark"
===
t
.
action
){
var
c
=
t
.
params
.
project
,
l
=
null
,
s
=
null
;
return
s
=
"微博"
===
t
.
value
[
0
].
data
.
clientFrom
?
t
.
value
.
map
(
function
(
t
){
return
{
id
:
t
.
data
.
id
,
url
:
t
.
data
.
url
,
mark
:
!
1
,
mid
:
t
.
data
.
mid
,
time
:
t
.
data
.
time
}}):
t
.
value
.
map
(
function
(
t
){
return
{
id
:
t
.
data
.
id
,
mark
:
!
1
,
source
:
t
.
data
.
source
,
time
:
t
.
data
.
time
,
title
:
t
.
data
.
title
,
url
:
t
.
data
.
url
}}),
a
.
a
.
post
(
""
.
concat
(
r
,
"interface/getDataMore/"
).
concat
(
i
,
".do"
),{
company
:
c
,
mark
:
s
,
type
:
t
.
value
[
0
].
data
.
clientFrom
},{
headers
:{
time
:(
new
Date
).
valueOf
()}}).
then
(
function
(
t
){
l
=
t
.
data
,
console
.
log
(
55555555555
),
o
({
data
:
l
,
tabProject
:
c
})}).
catch
(
function
(
t
){
console
.
log
(
t
)}),
!
0
}
if
(
"doingMark"
===
t
.
action
)
return
a
.
a
.
post
(
""
.
concat
(
r
,
"interface/markDataMoreBiz/"
).
concat
(
i
,
".do"
),
t
.
value
,{
headers
:{
time
:(
new
Date
).
valueOf
()}}).
then
(
function
(
t
){
var
e
=
t
.
data
;
o
({
data
:
e
})}).
catch
(
function
(
t
){
console
.
log
(
t
)}),
!
0
;
if
(
"open"
===
t
.
action
)
chrome
.
browserAction
.
setIcon
({
path
:
"images/icon.png"
});
else
{
if
(
"xhttp"
===
t
.
action
)
return
a
.
a
.
get
(
""
.
concat
(
r
).
concat
(
t
.
url
,
"/"
).
concat
(
i
,
".do"
),{
params
:
t
.
params
}).
then
(
function
(
t
){
console
.
log
(
t
),
o
({
data
:
t
.
data
})}).
catch
(
function
(
t
){
console
.
log
(
t
)}),
!
0
;
if
(
"weiboxhttp"
===
t
.
action
)
return
a
.
a
.
get
(
""
.
concat
(
t
.
url
)).
then
(
function
(
t
){
console
.
log
(
t
),
o
({
data
:
t
.
data
})}).
catch
(
function
(
t
){
console
.
log
(
t
)}),
!
0
}}}),
document
.
addEventListener
(
"DOMContentLoaded"
,
function
(){
a
()({
url
:
"https://httpbin.org/ip"
,
method
:
"GET"
}).
then
(
function
(
t
){
console
.
log
(
t
.
data
.
origin
);
var
e
=
t
.
data
.
origin
.
includes
(
"60.12.216.130"
);
console
.
log
(
e
);
var
o
=
"
\
n var isInner = "
.
concat
(
e
,
"
\
n var direct = 'DIRECT;'
\
n var proxyinner = 'PROXY 192.168.0.36:31128'
\
n function FindProxyForURL(url, host) {
\
n if (shExpMatch(url,
\"
https:*weixin.sogou.com*
\"
) && isInner){
\
n return proxyinner
\
n } else {
\
n return direct;
\
n }
\
n }
\
n "
),
n
=
{
value
:{
mode
:
"pac_script"
,
pacScript
:{
data
:
o
,
mandatory
:
!
0
}},
scope
:
"regular"
};
chrome
.
proxy
.
settings
.
set
(
n
,
function
(){
console
.
log
(
"set success"
)})})}),
chrome
.
browserAction
.
setIcon
({
path
:
"images/icon.png"
}),
chrome
.
browserAction
.
onClicked
.
addListener
(
function
(){
c
=!
c
,
c
?(
chrome
.
browserAction
.
setIcon
({
path
:
"images/icon.png"
}),
chrome
.
storage
.
sync
.
set
({
isopen
:
!
0
})):(
chrome
.
browserAction
.
setIcon
({
path
:
"images/icon2.png"
}),
chrome
.
storage
.
sync
.
set
({
isopen
:
!
1
}))}),
chrome
.
contextMenus
.
create
({
title
:
"测试右键菜单"
,
onclick
:
function
(){
alert
(
"您点击了右键菜单!"
)}}),
chrome
.
contextMenus
.
create
({
title
:
"使用度娘搜索:%s"
,
contexts
:[
"selection"
],
onclick
:
function
(
t
){
chrome
.
tabs
.
create
({
url
:
"https://www.baidu.com/s?ie=utf-8&wd="
+
encodeURI
(
t
.
selectionText
)})}}),
chrome
.
storage
.
local
.
get
(
"configure"
,
function
(
t
){
var
e
=
t
.
configure
;
console
.
log
(
"1234545487645"
),
console
.
log
(
e
),
e
?
console
.
log
(
"has get defaultURL"
):
l
()})}});
(
function
(
e
){
function
t
(
t
){
for
(
var
n
,
r
,
i
=
t
[
0
],
l
=
t
[
1
],
s
=
t
[
2
],
f
=
0
,
g
=
[];
f
<
i
.
length
;
f
++
)
r
=
i
[
f
],
c
[
r
]
&&
g
.
push
(
c
[
r
][
0
]),
c
[
r
]
=
0
;
for
(
n
in
l
)
Object
.
prototype
.
hasOwnProperty
.
call
(
l
,
n
)
&&
(
e
[
n
]
=
l
[
n
]);
u
&&
u
(
t
);
while
(
g
.
length
)
g
.
shift
()();
return
a
.
push
.
apply
(
a
,
s
||
[]),
o
()}
function
o
(){
for
(
var
e
,
t
=
0
;
t
<
a
.
length
;
t
++
){
for
(
var
o
=
a
[
t
],
n
=!
0
,
i
=
1
;
i
<
o
.
length
;
i
++
){
var
l
=
o
[
i
];
0
!==
c
[
l
]
&&
(
n
=!
1
)}
n
&&
(
a
.
splice
(
t
--
,
1
),
e
=
r
(
r
.
s
=
o
[
0
]))}
return
e
}
var
n
=
{},
c
=
{
background
:
0
},
a
=
[];
function
r
(
t
){
if
(
n
[
t
])
return
n
[
t
].
exports
;
var
o
=
n
[
t
]
=
{
i
:
t
,
l
:
!
1
,
exports
:{}};
return
e
[
t
].
call
(
o
.
exports
,
o
,
o
.
exports
,
r
),
o
.
l
=!
0
,
o
.
exports
}
r
.
m
=
e
,
r
.
c
=
n
,
r
.
d
=
function
(
e
,
t
,
o
){
r
.
o
(
e
,
t
)
||
Object
.
defineProperty
(
e
,
t
,{
enumerable
:
!
0
,
get
:
o
})},
r
.
r
=
function
(
e
){
"undefined"
!==
typeof
Symbol
&&
Symbol
.
toStringTag
&&
Object
.
defineProperty
(
e
,
Symbol
.
toStringTag
,{
value
:
"Module"
}),
Object
.
defineProperty
(
e
,
"__esModule"
,{
value
:
!
0
})},
r
.
t
=
function
(
e
,
t
){
if
(
1
&
t
&&
(
e
=
r
(
e
)),
8
&
t
)
return
e
;
if
(
4
&
t
&&
"object"
===
typeof
e
&&
e
&&
e
.
__esModule
)
return
e
;
var
o
=
Object
.
create
(
null
);
if
(
r
.
r
(
o
),
Object
.
defineProperty
(
o
,
"default"
,{
enumerable
:
!
0
,
value
:
e
}),
2
&
t
&&
"string"
!=
typeof
e
)
for
(
var
n
in
e
)
r
.
d
(
o
,
n
,
function
(
t
){
return
e
[
t
]}.
bind
(
null
,
n
));
return
o
},
r
.
n
=
function
(
e
){
var
t
=
e
&&
e
.
__esModule
?
function
(){
return
e
[
"default"
]}:
function
(){
return
e
};
return
r
.
d
(
t
,
"a"
,
t
),
t
},
r
.
o
=
function
(
e
,
t
){
return
Object
.
prototype
.
hasOwnProperty
.
call
(
e
,
t
)},
r
.
p
=
"/out/"
;
var
i
=
window
[
"webpackJsonp"
]
=
window
[
"webpackJsonp"
]
||
[],
l
=
i
.
push
.
bind
(
i
);
i
.
push
=
t
,
i
=
i
.
slice
();
for
(
var
s
=
0
;
s
<
i
.
length
;
s
++
)
t
(
i
[
s
]);
var
u
=
l
;
a
.
push
([
5
,
"chunk-vendors"
]),
o
()})({
5
:
function
(
e
,
t
,
o
){
e
.
exports
=
o
(
"f728"
)},
f728
:
function
(
e
,
t
,
o
){
"use strict"
;
o
.
r
(
t
);
o
(
"6762"
),
o
(
"2fdb"
),
o
(
"ac6a"
),
o
(
"456d"
),
o
(
"cadf"
),
o
(
"551c"
),
o
(
"f751"
),
o
(
"097d"
);
var
n
=
o
(
"7f43"
),
c
=
o
.
n
(
n
);
c
.
a
.
defaults
.
withCredentials
=!
0
,
c
.
a
.
interceptors
.
response
.
use
(
function
(
e
){
if
(
console
.
log
(
"添加响应拦截器"
,
e
),
200
!==
e
.
status
||!
e
.
data
||
"插件版本过低,请升级"
!==
e
.
data
.
message
)
return
e
;
chrome
.
notifications
.
create
(
Math
.
random
()
+
""
,{
type
:
"basic"
,
iconUrl
:
"images/icon_19.png"
,
title
:
"通知"
,
message
:
"插件版本过低,请升级"
},
function
(
e
){
console
.
log
(
e
)})});
var
a
=!
0
,
r
=
"http://yuqing.zhiweidata.com/qbjcbackPhoenix/"
,
i
=
"1561017600000"
;
function
l
(){
c
.
a
.
get
(
""
.
concat
(
r
,
"interface/getGroupInfo/"
).
concat
(
i
,
".do"
)).
then
(
function
(
e
){
chrome
.
storage
.
local
.
set
({
configure
:
e
.
data
},
function
(){
console
.
log
(
"save success"
)})}).
catch
(
function
(
e
){
console
.
log
(
e
)})}
chrome
.
runtime
.
onMessageExternal
.
addListener
(
function
(
e
,
t
,
o
){
if
(
alert
(
123
),
console
.
log
(
1
),
console
.
log
(
e
),
console
.
log
(
2
),
console
.
log
(
t
),
console
.
log
(
3
),
console
.
log
(
o
),
"strong"
===
e
.
action
){
var
n
=
e
.
data
;
return
chrome
.
storage
.
local
.
get
(
"configure"
,
function
(
e
){
console
.
log
(
"11111111111"
),
console
.
log
(
e
),
n
.
projectList
=
e
.
configure
}),
chrome
.
storage
.
local
.
get
(
"project"
,
function
(
e
){
n
.
project
=
e
.
project
}),
chrome
.
storage
.
local
.
get
(
"user"
,
function
(
e
){
n
.
user
=
e
.
user
}),
chrome
.
storage
.
local
.
get
(
"rightStatue"
,
function
(
e
){
Object
.
keys
(
e
).
length
>
0
&&
(
n
.
rightStatue
=
e
.
rightStatue
,
o
({
data
:
n
}))}),
!
0
}
if
(
"SetStrong"
===
e
.
action
)
chrome
.
storage
.
local
.
set
(
e
.
data
);
else
{
if
(
"getstrong"
===
e
.
action
)
return
alert
(
789
),
console
.
log
(
"但是事实上身上"
),
console
.
log
(
e
),
chrome
.
storage
.
local
.
get
(
e
.
data
,
function
(
e
){
console
.
log
(
e
),
o
({
data
:
e
})}),
!
0
;
if
(
"checkUpmark"
===
e
.
action
){
var
a
=
e
.
params
.
project
,
l
=
null
,
s
=
null
;
return
s
=
"微博"
===
e
.
value
[
0
].
data
.
clientFrom
?
e
.
value
.
map
(
function
(
e
){
return
{
id
:
e
.
data
.
id
,
url
:
e
.
data
.
url
,
mark
:
!
1
,
mid
:
e
.
data
.
mid
,
time
:
e
.
data
.
time
}}):
e
.
value
.
map
(
function
(
e
){
return
{
id
:
e
.
data
.
id
,
mark
:
!
1
,
source
:
e
.
data
.
source
,
time
:
e
.
data
.
time
,
title
:
e
.
data
.
title
,
url
:
e
.
data
.
url
}}),
c
.
a
.
post
(
""
.
concat
(
r
,
"interface/getDataMore/"
).
concat
(
i
,
".do"
),{
company
:
a
,
mark
:
s
,
type
:
e
.
value
[
0
].
data
.
clientFrom
},{
headers
:{
time
:(
new
Date
).
valueOf
()}}).
then
(
function
(
e
){
l
=
e
.
data
,
console
.
log
(
55555555555
),
o
({
data
:
l
,
tabProject
:
a
})}).
catch
(
function
(
e
){
console
.
log
(
e
)}),
!
0
}
if
(
"doingMark"
===
e
.
action
)
return
c
.
a
.
post
(
""
.
concat
(
r
,
"interface/markDataMoreBiz/"
).
concat
(
i
,
".do"
),
e
.
value
,{
headers
:{
time
:(
new
Date
).
valueOf
()}}).
then
(
function
(
e
){
var
t
=
e
.
data
;
o
({
data
:
t
})}).
catch
(
function
(
e
){
console
.
log
(
e
)}),
!
0
;
if
(
"open"
===
e
.
action
)
chrome
.
browserAction
.
setIcon
({
path
:
"images/icon.png"
});
else
{
if
(
"xhttp"
===
e
.
action
)
return
c
.
a
.
get
(
""
.
concat
(
r
).
concat
(
e
.
url
,
"/"
).
concat
(
i
,
".do"
),{
params
:
e
.
params
}).
then
(
function
(
e
){
console
.
log
(
e
),
o
({
data
:
e
.
data
})}).
catch
(
function
(
e
){
console
.
log
(
e
)}),
!
0
;
if
(
"weiboxhttp"
===
e
.
action
)
return
c
.
a
.
get
(
""
.
concat
(
e
.
url
)).
then
(
function
(
e
){
console
.
log
(
e
),
o
({
data
:
e
.
data
})}).
catch
(
function
(
e
){
console
.
log
(
e
)}),
!
0
}}}),
document
.
addEventListener
(
"DOMContentLoaded"
,
function
(){
c
()({
url
:
"https://httpbin.org/ip"
,
method
:
"GET"
}).
then
(
function
(
e
){
console
.
log
(
e
.
data
.
origin
);
var
t
=
e
.
data
.
origin
.
includes
(
"60.12.216.130"
);
console
.
log
(
t
);
var
o
=
"
\
n var isInner = "
.
concat
(
t
,
"
\
n var direct = 'DIRECT;'
\
n var proxyinner = 'PROXY 192.168.0.36:31128'
\
n function FindProxyForURL(url, host) {
\
n if (shExpMatch(url,
\"
https:*weixin.sogou.com*
\"
) && isInner){
\
n return proxyinner
\
n } else {
\
n return direct;
\
n }
\
n }
\
n "
),
n
=
{
value
:{
mode
:
"pac_script"
,
pacScript
:{
data
:
o
,
mandatory
:
!
0
}},
scope
:
"regular"
};
chrome
.
proxy
.
settings
.
set
(
n
,
function
(){
console
.
log
(
"set success"
)})})}),
chrome
.
browserAction
.
setIcon
({
path
:
"images/icon.png"
}),
chrome
.
browserAction
.
onClicked
.
addListener
(
function
(){
a
=!
a
,
a
?(
chrome
.
browserAction
.
setIcon
({
path
:
"images/icon.png"
}),
chrome
.
storage
.
sync
.
set
({
isopen
:
!
0
})):(
chrome
.
browserAction
.
setIcon
({
path
:
"images/icon2.png"
}),
chrome
.
storage
.
sync
.
set
({
isopen
:
!
1
}))}),
chrome
.
contextMenus
.
create
({
title
:
"测试右键菜单"
,
onclick
:
function
(){
alert
(
"您点击了右键菜单!"
)}}),
chrome
.
contextMenus
.
create
({
title
:
"使用度娘搜索:%s"
,
contexts
:[
"selection"
],
onclick
:
function
(
e
){
chrome
.
tabs
.
create
({
url
:
"https://www.baidu.com/s?ie=utf-8&wd="
+
encodeURI
(
e
.
selectionText
)})}}),
chrome
.
storage
.
local
.
get
(
"configure"
,
function
(
e
){
var
t
=
e
.
configure
;
console
.
log
(
"1234545487645"
),
console
.
log
(
t
),
t
?
console
.
log
(
"has get defaultURL"
):
l
()})}});
//# sourceMappingURL=background.js.map
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment