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
9c536487
Commit
9c536487
authored
Jun 27, 2019
by
chencong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改测试文件
parent
7c630e0f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
9 deletions
+12
-9
background.js
+2
-1
out/css/popup.css
+2
-2
out/js/background.js
+2
-1
out/js/background.js.map
+2
-2
out/js/popup.js
+2
-1
out/js/popup.js.map
+2
-2
No files found.
background.js
View file @
9c536487
(
function
(
t
){
function
e
(
e
){
for
(
var
n
,
c
,
i
=
e
[
0
],
s
=
e
[
1
],
u
=
e
[
2
],
f
=
0
,
d
=
[];
f
<
i
.
length
;
f
++
)
c
=
i
[
f
],
r
[
c
]
&&
d
.
push
(
r
[
c
][
0
]),
r
[
c
]
=
0
;
for
(
n
in
s
)
Object
.
prototype
.
hasOwnProperty
.
call
(
s
,
n
)
&&
(
t
[
n
]
=
s
[
n
]);
l
&&
l
(
e
);
while
(
d
.
length
)
d
.
shift
()();
return
a
.
push
.
apply
(
a
,
u
||
[]),
o
()}
function
o
(){
for
(
var
t
,
e
=
0
;
e
<
a
.
length
;
e
++
){
for
(
var
o
=
a
[
e
],
n
=!
0
,
i
=
1
;
i
<
o
.
length
;
i
++
){
var
s
=
o
[
i
];
0
!==
r
[
s
]
&&
(
n
=!
1
)}
n
&&
(
a
.
splice
(
e
--
,
1
),
t
=
c
(
c
.
s
=
o
[
0
]))}
return
t
}
var
n
=
{},
r
=
{
background
:
0
},
a
=
[];
function
c
(
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
,
c
),
o
.
l
=!
0
,
o
.
exports
}
c
.
m
=
t
,
c
.
c
=
n
,
c
.
d
=
function
(
t
,
e
,
o
){
c
.
o
(
t
,
e
)
||
Object
.
defineProperty
(
t
,
e
,{
enumerable
:
!
0
,
get
:
o
})},
c
.
r
=
function
(
t
){
"undefined"
!==
typeof
Symbol
&&
Symbol
.
toStringTag
&&
Object
.
defineProperty
(
t
,
Symbol
.
toStringTag
,{
value
:
"Module"
}),
Object
.
defineProperty
(
t
,
"__esModule"
,{
value
:
!
0
})},
c
.
t
=
function
(
t
,
e
){
if
(
1
&
e
&&
(
t
=
c
(
t
)),
8
&
e
)
return
t
;
if
(
4
&
e
&&
"object"
===
typeof
t
&&
t
&&
t
.
__esModule
)
return
t
;
var
o
=
Object
.
create
(
null
);
if
(
c
.
r
(
o
),
Object
.
defineProperty
(
o
,
"default"
,{
enumerable
:
!
0
,
value
:
t
}),
2
&
e
&&
"string"
!=
typeof
t
)
for
(
var
n
in
t
)
c
.
d
(
o
,
n
,
function
(
e
){
return
t
[
e
]}.
bind
(
null
,
n
));
return
o
},
c
.
n
=
function
(
t
){
var
e
=
t
&&
t
.
__esModule
?
function
(){
return
t
[
"default"
]}:
function
(){
return
t
};
return
c
.
d
(
e
,
"a"
,
e
),
e
},
c
.
o
=
function
(
t
,
e
){
return
Object
.
prototype
.
hasOwnProperty
.
call
(
t
,
e
)},
c
.
p
=
"/out/"
;
var
i
=
window
[
"webpackJsonp"
]
=
window
[
"webpackJsonp"
]
||
[],
s
=
i
.
push
.
bind
(
i
);
i
.
push
=
e
,
i
=
i
.
slice
();
for
(
var
u
=
0
;
u
<
i
.
length
;
u
++
)
e
(
i
[
u
]);
var
l
=
s
;
a
.
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
(
"ac6a"
),
o
(
"456d"
),
o
(
"6762"
),
o
(
"2fdb"
),
o
(
"7514"
),
o
(
"cadf"
),
o
(
"551c"
),
o
(
"f751"
),
o
(
"097d"
);
var
n
=
o
(
"7f43"
),
r
=
o
.
n
(
n
);
chrome
.
management
.
getAll
(
function
(
t
){
console
.
log
(
888
);
var
e
=
t
.
find
(
function
(
t
){
return
"知微舆情"
===
t
.
description
}).
id
;
console
.
log
(
e
),
chrome
.
storage
.
local
.
set
({
ExtensionID
:
e
})}),
r
.
a
.
defaults
.
withCredentials
=!
0
,
r
.
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
a
=!
0
,
c
=
"http://yuqing.zhiweidata.com/qbjcbackPhoenix/"
,
i
=
"1561017600000"
;
function
s
(
t
,
e
,
o
){
if
(
console
.
log
(
t
),
console
.
log
(
o
),
"strong"
===
t
.
action
){
var
n
=
t
.
data
;
return
chrome
.
storage
.
local
.
get
(
"configure"
,
function
(
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
chrome
.
storage
.
local
.
get
(
t
.
data
,
function
(
t
){
console
.
log
(
t
),
o
({
data
:
t
})}),
!
0
;
if
(
"checkUpmark"
===
t
.
action
){
var
a
=
t
.
params
.
project
,
s
=
null
,
u
=
null
;
return
u
=
"微博"
===
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
}}),
r
.
a
.
post
(
""
.
concat
(
c
,
"interface/getDataMore/"
).
concat
(
i
,
".do"
),{
company
:
a
,
mark
:
u
,
type
:
t
.
value
[
0
].
data
.
clientFrom
},{
headers
:{
time
:(
new
Date
).
valueOf
()}}).
then
(
function
(
t
){
s
=
t
.
data
,
console
.
log
(
55555555555
),
o
({
data
:
s
,
tabProject
:
a
})}).
catch
(
function
(
t
){
console
.
log
(
t
)}),
!
0
}
if
(
"doingMark"
===
t
.
action
)
return
r
.
a
.
post
(
""
.
concat
(
c
,
"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
r
.
a
.
get
(
""
.
concat
(
c
).
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
r
.
a
.
get
(
""
.
concat
(
t
.
url
)).
then
(
function
(
t
){
console
.
log
(
t
),
o
({
data
:
t
.
data
})}).
catch
(
function
(
t
){
console
.
log
(
t
)}),
!
0
}}}
function
u
(){
r
.
a
.
get
(
""
.
concat
(
c
,
"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
)})}
document
.
addEventListener
(
"DOMContentLoaded"
,
function
(){
r
()({
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
\
t var isInner = "
.
concat
(
e
,
"
\
n
\
t var direct = 'DIRECT;'
\
n
\
t var proxyinner = 'PROXY 192.168.0.36:31128'
\
n
\
t function FindProxyForURL(url, host) {
\
n
\
t if (shExpMatch(url,
\"
https:*weixin.sogou.com*
\"
) && isInner){
\
n
\
t return proxyinner
\
n
\
t } else {
\
n
\
t return direct;
\
n
\
t }
\
n
\
t }
\
n
\
t "
),
n
=
{
value
:{
mode
:
"pac_script"
,
pacScript
:{
data
:
o
,
mandatory
:
!
0
}},
scope
:
"regular"
};
chrome
.
proxy
.
settings
.
set
(
n
,
function
(){
console
.
log
(
"set success"
)})})}),
chrome
.
runtime
.
onMessageExternal
.
addListener
(
function
(
t
,
e
,
o
){
return
s
(
t
,
e
,
o
),
!
0
}),
chrome
.
runtime
.
onMessage
.
addListener
(
function
(
t
,
e
,
o
){
return
s
(
t
,
e
,
o
),
!
0
}),
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
(
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"
):
u
()})}});
(
function
(
t
){
function
e
(
e
){
for
(
var
o
,
c
,
i
=
e
[
0
],
u
=
e
[
1
],
l
=
e
[
2
],
f
=
0
,
d
=
[];
f
<
i
.
length
;
f
++
)
c
=
i
[
f
],
a
[
c
]
&&
d
.
push
(
a
[
c
][
0
]),
a
[
c
]
=
0
;
for
(
o
in
u
)
Object
.
prototype
.
hasOwnProperty
.
call
(
u
,
o
)
&&
(
t
[
o
]
=
u
[
o
]);
s
&&
s
(
e
);
while
(
d
.
length
)
d
.
shift
()();
return
r
.
push
.
apply
(
r
,
l
||
[]),
n
()}
function
n
(){
for
(
var
t
,
e
=
0
;
e
<
r
.
length
;
e
++
){
for
(
var
n
=
r
[
e
],
o
=!
0
,
i
=
1
;
i
<
n
.
length
;
i
++
){
var
u
=
n
[
i
];
0
!==
a
[
u
]
&&
(
o
=!
1
)}
o
&&
(
r
.
splice
(
e
--
,
1
),
t
=
c
(
c
.
s
=
n
[
0
]))}
return
t
}
var
o
=
{},
a
=
{
background
:
0
},
r
=
[];
function
c
(
e
){
if
(
o
[
e
])
return
o
[
e
].
exports
;
var
n
=
o
[
e
]
=
{
i
:
e
,
l
:
!
1
,
exports
:{}};
return
t
[
e
].
call
(
n
.
exports
,
n
,
n
.
exports
,
c
),
n
.
l
=!
0
,
n
.
exports
}
c
.
m
=
t
,
c
.
c
=
o
,
c
.
d
=
function
(
t
,
e
,
n
){
c
.
o
(
t
,
e
)
||
Object
.
defineProperty
(
t
,
e
,{
enumerable
:
!
0
,
get
:
n
})},
c
.
r
=
function
(
t
){
"undefined"
!==
typeof
Symbol
&&
Symbol
.
toStringTag
&&
Object
.
defineProperty
(
t
,
Symbol
.
toStringTag
,{
value
:
"Module"
}),
Object
.
defineProperty
(
t
,
"__esModule"
,{
value
:
!
0
})},
c
.
t
=
function
(
t
,
e
){
if
(
1
&
e
&&
(
t
=
c
(
t
)),
8
&
e
)
return
t
;
if
(
4
&
e
&&
"object"
===
typeof
t
&&
t
&&
t
.
__esModule
)
return
t
;
var
n
=
Object
.
create
(
null
);
if
(
c
.
r
(
n
),
Object
.
defineProperty
(
n
,
"default"
,{
enumerable
:
!
0
,
value
:
t
}),
2
&
e
&&
"string"
!=
typeof
t
)
for
(
var
o
in
t
)
c
.
d
(
n
,
o
,
function
(
e
){
return
t
[
e
]}.
bind
(
null
,
o
));
return
n
},
c
.
n
=
function
(
t
){
var
e
=
t
&&
t
.
__esModule
?
function
(){
return
t
[
"default"
]}:
function
(){
return
t
};
return
c
.
d
(
e
,
"a"
,
e
),
e
},
c
.
o
=
function
(
t
,
e
){
return
Object
.
prototype
.
hasOwnProperty
.
call
(
t
,
e
)},
c
.
p
=
"/out/"
;
var
i
=
window
[
"webpackJsonp"
]
=
window
[
"webpackJsonp"
]
||
[],
u
=
i
.
push
.
bind
(
i
);
i
.
push
=
e
,
i
=
i
.
slice
();
for
(
var
l
=
0
;
l
<
i
.
length
;
l
++
)
e
(
i
[
l
]);
var
s
=
u
;
r
.
push
([
5
,
"chunk-vendors"
]),
n
()})({
5
:
function
(
t
,
e
,
n
){
t
.
exports
=
n
(
"f728"
)},
f728
:
function
(
t
,
e
,
n
){
"use strict"
;
n
.
r
(
e
);
n
(
"ac6a"
),
n
(
"456d"
),
n
(
"6762"
),
n
(
"2fdb"
),
n
(
"7514"
),
n
(
"cadf"
),
n
(
"551c"
),
n
(
"f751"
),
n
(
"097d"
);
var
o
=
n
(
"7f43"
),
a
=
n
.
n
(
o
);
chrome
.
management
.
getAll
(
function
(
t
){
console
.
log
(
888
);
var
e
=
t
.
find
(
function
(
t
){
return
"知微舆情"
===
t
.
description
}).
id
;
console
.
log
(
e
),
chrome
.
storage
.
local
.
set
({
ExtensionID
:
e
})}),
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
r
=
"http://yuqing.zhiweidata.com/qbjcbackPhoenix/"
,
c
=
"1561017600000"
;
function
i
(
t
,
e
,
n
){
if
(
console
.
log
(
t
),
console
.
log
(
n
),
"strong"
===
t
.
action
){
var
o
=
t
.
data
;
return
chrome
.
storage
.
local
.
get
(
"configure"
,
function
(
t
){
o
.
projectList
=
t
.
configure
}),
chrome
.
storage
.
local
.
get
(
"project"
,
function
(
t
){
o
.
project
=
t
.
project
}),
chrome
.
storage
.
local
.
get
(
"user"
,
function
(
t
){
o
.
user
=
t
.
user
}),
chrome
.
storage
.
local
.
get
(
"rightStatue"
,
function
(
t
){
Object
.
keys
(
t
).
length
>
0
&&
(
o
.
rightStatue
=
t
.
rightStatue
,
n
({
data
:
o
}))}),
!
0
}
if
(
"SetStrong"
===
t
.
action
)
chrome
.
storage
.
local
.
set
(
t
.
data
);
else
{
if
(
"getstrong"
===
t
.
action
)
return
chrome
.
storage
.
local
.
get
(
t
.
data
,
function
(
t
){
console
.
log
(
t
),
n
({
data
:
t
})}),
!
0
;
if
(
"checkUpmark"
===
t
.
action
){
var
i
=
t
.
params
.
project
,
u
=
null
,
l
=
null
;
return
l
=
"微博"
===
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
(
c
,
".do"
),{
company
:
i
,
mark
:
l
,
type
:
t
.
value
[
0
].
data
.
clientFrom
},{
headers
:{
time
:(
new
Date
).
valueOf
()}}).
then
(
function
(
t
){
u
=
t
.
data
,
console
.
log
(
55555555555
),
n
({
data
:
u
,
tabProject
:
i
})}).
catch
(
function
(
t
){
console
.
log
(
t
)}),
!
0
}
if
(
"doingMark"
===
t
.
action
)
return
a
.
a
.
post
(
""
.
concat
(
r
,
"interface/markDataMoreBiz/"
).
concat
(
c
,
".do"
),
t
.
value
,{
headers
:{
time
:(
new
Date
).
valueOf
()}}).
then
(
function
(
t
){
var
e
=
t
.
data
;
n
({
data
:
e
})}).
catch
(
function
(
t
){
console
.
log
(
t
)}),
!
0
;
if
(
"open"
===
t
.
action
);
else
{
if
(
"xhttp"
===
t
.
action
)
return
a
.
a
.
get
(
""
.
concat
(
r
).
concat
(
t
.
url
,
"/"
).
concat
(
c
,
".do"
),{
params
:
t
.
params
}).
then
(
function
(
t
){
console
.
log
(
t
),
n
({
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
),
n
({
data
:
t
.
data
})}).
catch
(
function
(
t
){
console
.
log
(
t
)}),
!
0
}}}
function
u
(){
a
.
a
.
get
(
""
.
concat
(
r
,
"interface/getGroupInfo/"
).
concat
(
c
,
".do"
)).
then
(
function
(
t
){
chrome
.
storage
.
local
.
set
({
configure
:
t
.
data
},
function
(){
console
.
log
(
"save success"
)})}).
catch
(
function
(
t
){
console
.
log
(
t
)})}
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
n
=
"
\
n
\
t var isInner = "
.
concat
(
e
,
"
\
n
\
t var direct = 'DIRECT;'
\
n
\
t var proxyinner = 'PROXY 192.168.0.36:31128'
\
n
\
t function FindProxyForURL(url, host) {
\
n
\
t if (shExpMatch(url,
\"
https:*weixin.sogou.com*
\"
) && isInner){
\
n
\
t return proxyinner
\
n
\
t } else {
\
n
\
t return direct;
\
n
\
t }
\
n
\
t }
\
n
\
t "
),
o
=
{
value
:{
mode
:
"pac_script"
,
pacScript
:{
data
:
n
,
mandatory
:
!
0
}},
scope
:
"regular"
};
chrome
.
proxy
.
settings
.
set
(
o
,
function
(){
console
.
log
(
"set success"
)})})}),
chrome
.
runtime
.
onMessageExternal
.
addListener
(
function
(
t
,
e
,
n
){
return
i
(
t
,
e
,
n
),
!
0
}),
chrome
.
runtime
.
onMessage
.
addListener
(
function
(
t
,
e
,
n
){
return
i
(
t
,
e
,
n
),
!
0
}),
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
(
e
),
e
?
console
.
log
(
"has get defaultURL"
):
u
()})}});
//# sourceMappingURL=background.js.map
\ No newline at end of file
out/css/popup.css
View file @
9c536487
.main_popup
[
data-v-d39105b4
]
{
width
:
200px
;
height
:
100px
}
.index
[
data-v-d39105b4
]
{
width
:
100%
;
height
:
100%
;
font-size
:
12px
;
display
:
-webkit-box
;
display
:
-ms-flexbox
;
display
:
flex
;
-webkit-box-align
:
center
;
-ms-flex-align
:
center
;
align-items
:
center
;
-webkit-box-pack
:
center
;
-ms-flex-pack
:
center
;
justify-content
:
center
;
-webkit-box-orient
:
horizontal
;
-webkit-box-direction
:
normal
;
-ms-flex-flow
:
row
nowrap
;
flex-flow
:
row
nowrap
}
.index
.switch
[
data-v-d39105b4
]
{
display
:
inline-block
;
width
:
76px
;
height
:
36px
;
padding
:
3px
;
position
:
relative
}
.index
.switch
[
data-v-d39105b4
]
:hover
{
cursor
:
pointer
}
.index
.slide
[
data-v-d39105b4
]
{
position
:
absolute
;
left
:
0
;
right
:
0
;
bottom
:
0
;
top
:
0
;
background
:
#ccc
;
border-radius
:
36px
}
.index
.slide
[
data-v-d39105b4
]
:before
{
margin
:
3px
;
content
:
"OFF"
;
display
:
inline-block
;
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
30px
;
height
:
30px
;
line-height
:
30px
;
text-align
:
center
;
background
:
#fff
;
border-radius
:
50%
;
-webkit-transition
:
all
.3s
linear
;
transition
:
all
.3s
linear
;
-webkit-box-shadow
:
2px
2px
2px
rgba
(
0
,
0
,
0
,
.3
);
box-shadow
:
2px
2px
2px
rgba
(
0
,
0
,
0
,
.3
);
font-size
:
12px
}
.index
#switch
:checked
+
.slide
[
data-v-d39105b4
]
{
background
:
#2196f3
}
.index
#switch
:checked
+
.slide
[
data-v-d39105b4
]
:before
{
content
:
"ON"
;
-webkit-transform
:
translate
(
40px
);
transform
:
translate
(
40px
);
-webkit-box-shadow
:
-2px
2px
2px
rgba
(
0
,
0
,
0
,
.3
);
box-shadow
:
-2px
2px
2px
rgba
(
0
,
0
,
0
,
.3
)}
\ No newline at end of file
.main_popup
[
data-v-409cdc1c
]
{
width
:
200px
;
height
:
100px
}
.index
[
data-v-409cdc1c
]
{
width
:
100%
;
height
:
100%
;
font-size
:
12px
;
display
:
-webkit-box
;
display
:
-ms-flexbox
;
display
:
flex
;
-webkit-box-align
:
center
;
-ms-flex-align
:
center
;
align-items
:
center
;
-webkit-box-pack
:
center
;
-ms-flex-pack
:
center
;
justify-content
:
center
;
-webkit-box-orient
:
horizontal
;
-webkit-box-direction
:
normal
;
-ms-flex-flow
:
row
nowrap
;
flex-flow
:
row
nowrap
}
.index
.switch
[
data-v-409cdc1c
]
{
display
:
inline-block
;
width
:
76px
;
height
:
36px
;
padding
:
3px
;
position
:
relative
}
.index
.switch
[
data-v-409cdc1c
]
:hover
{
cursor
:
pointer
}
.index
.slide
[
data-v-409cdc1c
]
{
position
:
absolute
;
left
:
0
;
right
:
0
;
bottom
:
0
;
top
:
0
;
background
:
#ccc
;
border-radius
:
36px
}
.index
.slide
[
data-v-409cdc1c
]
:before
{
margin
:
3px
;
content
:
"OFF"
;
display
:
inline-block
;
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
30px
;
height
:
30px
;
line-height
:
30px
;
text-align
:
center
;
background
:
#fff
;
border-radius
:
50%
;
-webkit-transition
:
all
.3s
linear
;
transition
:
all
.3s
linear
;
-webkit-box-shadow
:
2px
2px
2px
rgba
(
0
,
0
,
0
,
.3
);
box-shadow
:
2px
2px
2px
rgba
(
0
,
0
,
0
,
.3
);
font-size
:
12px
}
.index
#switch
:checked
+
.slide
[
data-v-409cdc1c
]
{
background
:
#2196f3
}
.index
#switch
:checked
+
.slide
[
data-v-409cdc1c
]
:before
{
content
:
"ON"
;
-webkit-transform
:
translate
(
40px
);
transform
:
translate
(
40px
);
-webkit-box-shadow
:
-2px
2px
2px
rgba
(
0
,
0
,
0
,
.3
);
box-shadow
:
-2px
2px
2px
rgba
(
0
,
0
,
0
,
.3
)}
\ No newline at end of file
out/js/background.js
View file @
9c536487
(
function
(
t
){
function
e
(
e
){
for
(
var
n
,
c
,
i
=
e
[
0
],
s
=
e
[
1
],
u
=
e
[
2
],
f
=
0
,
d
=
[];
f
<
i
.
length
;
f
++
)
c
=
i
[
f
],
r
[
c
]
&&
d
.
push
(
r
[
c
][
0
]),
r
[
c
]
=
0
;
for
(
n
in
s
)
Object
.
prototype
.
hasOwnProperty
.
call
(
s
,
n
)
&&
(
t
[
n
]
=
s
[
n
]);
l
&&
l
(
e
);
while
(
d
.
length
)
d
.
shift
()();
return
a
.
push
.
apply
(
a
,
u
||
[]),
o
()}
function
o
(){
for
(
var
t
,
e
=
0
;
e
<
a
.
length
;
e
++
){
for
(
var
o
=
a
[
e
],
n
=!
0
,
i
=
1
;
i
<
o
.
length
;
i
++
){
var
s
=
o
[
i
];
0
!==
r
[
s
]
&&
(
n
=!
1
)}
n
&&
(
a
.
splice
(
e
--
,
1
),
t
=
c
(
c
.
s
=
o
[
0
]))}
return
t
}
var
n
=
{},
r
=
{
background
:
0
},
a
=
[];
function
c
(
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
,
c
),
o
.
l
=!
0
,
o
.
exports
}
c
.
m
=
t
,
c
.
c
=
n
,
c
.
d
=
function
(
t
,
e
,
o
){
c
.
o
(
t
,
e
)
||
Object
.
defineProperty
(
t
,
e
,{
enumerable
:
!
0
,
get
:
o
})},
c
.
r
=
function
(
t
){
"undefined"
!==
typeof
Symbol
&&
Symbol
.
toStringTag
&&
Object
.
defineProperty
(
t
,
Symbol
.
toStringTag
,{
value
:
"Module"
}),
Object
.
defineProperty
(
t
,
"__esModule"
,{
value
:
!
0
})},
c
.
t
=
function
(
t
,
e
){
if
(
1
&
e
&&
(
t
=
c
(
t
)),
8
&
e
)
return
t
;
if
(
4
&
e
&&
"object"
===
typeof
t
&&
t
&&
t
.
__esModule
)
return
t
;
var
o
=
Object
.
create
(
null
);
if
(
c
.
r
(
o
),
Object
.
defineProperty
(
o
,
"default"
,{
enumerable
:
!
0
,
value
:
t
}),
2
&
e
&&
"string"
!=
typeof
t
)
for
(
var
n
in
t
)
c
.
d
(
o
,
n
,
function
(
e
){
return
t
[
e
]}.
bind
(
null
,
n
));
return
o
},
c
.
n
=
function
(
t
){
var
e
=
t
&&
t
.
__esModule
?
function
(){
return
t
[
"default"
]}:
function
(){
return
t
};
return
c
.
d
(
e
,
"a"
,
e
),
e
},
c
.
o
=
function
(
t
,
e
){
return
Object
.
prototype
.
hasOwnProperty
.
call
(
t
,
e
)},
c
.
p
=
"/out/"
;
var
i
=
window
[
"webpackJsonp"
]
=
window
[
"webpackJsonp"
]
||
[],
s
=
i
.
push
.
bind
(
i
);
i
.
push
=
e
,
i
=
i
.
slice
();
for
(
var
u
=
0
;
u
<
i
.
length
;
u
++
)
e
(
i
[
u
]);
var
l
=
s
;
a
.
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
(
"ac6a"
),
o
(
"456d"
),
o
(
"6762"
),
o
(
"2fdb"
),
o
(
"7514"
),
o
(
"cadf"
),
o
(
"551c"
),
o
(
"f751"
),
o
(
"097d"
);
var
n
=
o
(
"7f43"
),
r
=
o
.
n
(
n
);
chrome
.
management
.
getAll
(
function
(
t
){
console
.
log
(
888
);
var
e
=
t
.
find
(
function
(
t
){
return
"知微舆情"
===
t
.
description
}).
id
;
console
.
log
(
e
),
chrome
.
storage
.
local
.
set
({
ExtensionID
:
e
})}),
r
.
a
.
defaults
.
withCredentials
=!
0
,
r
.
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
a
=!
0
,
c
=
"http://yuqing.zhiweidata.com/qbjcbackPhoenix/"
,
i
=
"1561017600000"
;
function
s
(
t
,
e
,
o
){
if
(
console
.
log
(
t
),
console
.
log
(
o
),
"strong"
===
t
.
action
){
var
n
=
t
.
data
;
return
chrome
.
storage
.
local
.
get
(
"configure"
,
function
(
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
chrome
.
storage
.
local
.
get
(
t
.
data
,
function
(
t
){
console
.
log
(
t
),
o
({
data
:
t
})}),
!
0
;
if
(
"checkUpmark"
===
t
.
action
){
var
a
=
t
.
params
.
project
,
s
=
null
,
u
=
null
;
return
u
=
"微博"
===
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
}}),
r
.
a
.
post
(
""
.
concat
(
c
,
"interface/getDataMore/"
).
concat
(
i
,
".do"
),{
company
:
a
,
mark
:
u
,
type
:
t
.
value
[
0
].
data
.
clientFrom
},{
headers
:{
time
:(
new
Date
).
valueOf
()}}).
then
(
function
(
t
){
s
=
t
.
data
,
console
.
log
(
55555555555
),
o
({
data
:
s
,
tabProject
:
a
})}).
catch
(
function
(
t
){
console
.
log
(
t
)}),
!
0
}
if
(
"doingMark"
===
t
.
action
)
return
r
.
a
.
post
(
""
.
concat
(
c
,
"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
r
.
a
.
get
(
""
.
concat
(
c
).
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
r
.
a
.
get
(
""
.
concat
(
t
.
url
)).
then
(
function
(
t
){
console
.
log
(
t
),
o
({
data
:
t
.
data
})}).
catch
(
function
(
t
){
console
.
log
(
t
)}),
!
0
}}}
function
u
(){
r
.
a
.
get
(
""
.
concat
(
c
,
"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
)})}
document
.
addEventListener
(
"DOMContentLoaded"
,
function
(){
r
()({
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
\
t var isInner = "
.
concat
(
e
,
"
\
n
\
t var direct = 'DIRECT;'
\
n
\
t var proxyinner = 'PROXY 192.168.0.36:31128'
\
n
\
t function FindProxyForURL(url, host) {
\
n
\
t if (shExpMatch(url,
\"
https:*weixin.sogou.com*
\"
) && isInner){
\
n
\
t return proxyinner
\
n
\
t } else {
\
n
\
t return direct;
\
n
\
t }
\
n
\
t }
\
n
\
t "
),
n
=
{
value
:{
mode
:
"pac_script"
,
pacScript
:{
data
:
o
,
mandatory
:
!
0
}},
scope
:
"regular"
};
chrome
.
proxy
.
settings
.
set
(
n
,
function
(){
console
.
log
(
"set success"
)})})}),
chrome
.
runtime
.
onMessageExternal
.
addListener
(
function
(
t
,
e
,
o
){
return
s
(
t
,
e
,
o
),
!
0
}),
chrome
.
runtime
.
onMessage
.
addListener
(
function
(
t
,
e
,
o
){
return
s
(
t
,
e
,
o
),
!
0
}),
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
(
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"
):
u
()})}});
(
function
(
t
){
function
e
(
e
){
for
(
var
o
,
c
,
i
=
e
[
0
],
u
=
e
[
1
],
l
=
e
[
2
],
f
=
0
,
d
=
[];
f
<
i
.
length
;
f
++
)
c
=
i
[
f
],
a
[
c
]
&&
d
.
push
(
a
[
c
][
0
]),
a
[
c
]
=
0
;
for
(
o
in
u
)
Object
.
prototype
.
hasOwnProperty
.
call
(
u
,
o
)
&&
(
t
[
o
]
=
u
[
o
]);
s
&&
s
(
e
);
while
(
d
.
length
)
d
.
shift
()();
return
r
.
push
.
apply
(
r
,
l
||
[]),
n
()}
function
n
(){
for
(
var
t
,
e
=
0
;
e
<
r
.
length
;
e
++
){
for
(
var
n
=
r
[
e
],
o
=!
0
,
i
=
1
;
i
<
n
.
length
;
i
++
){
var
u
=
n
[
i
];
0
!==
a
[
u
]
&&
(
o
=!
1
)}
o
&&
(
r
.
splice
(
e
--
,
1
),
t
=
c
(
c
.
s
=
n
[
0
]))}
return
t
}
var
o
=
{},
a
=
{
background
:
0
},
r
=
[];
function
c
(
e
){
if
(
o
[
e
])
return
o
[
e
].
exports
;
var
n
=
o
[
e
]
=
{
i
:
e
,
l
:
!
1
,
exports
:{}};
return
t
[
e
].
call
(
n
.
exports
,
n
,
n
.
exports
,
c
),
n
.
l
=!
0
,
n
.
exports
}
c
.
m
=
t
,
c
.
c
=
o
,
c
.
d
=
function
(
t
,
e
,
n
){
c
.
o
(
t
,
e
)
||
Object
.
defineProperty
(
t
,
e
,{
enumerable
:
!
0
,
get
:
n
})},
c
.
r
=
function
(
t
){
"undefined"
!==
typeof
Symbol
&&
Symbol
.
toStringTag
&&
Object
.
defineProperty
(
t
,
Symbol
.
toStringTag
,{
value
:
"Module"
}),
Object
.
defineProperty
(
t
,
"__esModule"
,{
value
:
!
0
})},
c
.
t
=
function
(
t
,
e
){
if
(
1
&
e
&&
(
t
=
c
(
t
)),
8
&
e
)
return
t
;
if
(
4
&
e
&&
"object"
===
typeof
t
&&
t
&&
t
.
__esModule
)
return
t
;
var
n
=
Object
.
create
(
null
);
if
(
c
.
r
(
n
),
Object
.
defineProperty
(
n
,
"default"
,{
enumerable
:
!
0
,
value
:
t
}),
2
&
e
&&
"string"
!=
typeof
t
)
for
(
var
o
in
t
)
c
.
d
(
n
,
o
,
function
(
e
){
return
t
[
e
]}.
bind
(
null
,
o
));
return
n
},
c
.
n
=
function
(
t
){
var
e
=
t
&&
t
.
__esModule
?
function
(){
return
t
[
"default"
]}:
function
(){
return
t
};
return
c
.
d
(
e
,
"a"
,
e
),
e
},
c
.
o
=
function
(
t
,
e
){
return
Object
.
prototype
.
hasOwnProperty
.
call
(
t
,
e
)},
c
.
p
=
"/out/"
;
var
i
=
window
[
"webpackJsonp"
]
=
window
[
"webpackJsonp"
]
||
[],
u
=
i
.
push
.
bind
(
i
);
i
.
push
=
e
,
i
=
i
.
slice
();
for
(
var
l
=
0
;
l
<
i
.
length
;
l
++
)
e
(
i
[
l
]);
var
s
=
u
;
r
.
push
([
5
,
"chunk-vendors"
]),
n
()})({
5
:
function
(
t
,
e
,
n
){
t
.
exports
=
n
(
"f728"
)},
f728
:
function
(
t
,
e
,
n
){
"use strict"
;
n
.
r
(
e
);
n
(
"ac6a"
),
n
(
"456d"
),
n
(
"6762"
),
n
(
"2fdb"
),
n
(
"7514"
),
n
(
"cadf"
),
n
(
"551c"
),
n
(
"f751"
),
n
(
"097d"
);
var
o
=
n
(
"7f43"
),
a
=
n
.
n
(
o
);
chrome
.
management
.
getAll
(
function
(
t
){
console
.
log
(
888
);
var
e
=
t
.
find
(
function
(
t
){
return
"知微舆情"
===
t
.
description
}).
id
;
console
.
log
(
e
),
chrome
.
storage
.
local
.
set
({
ExtensionID
:
e
})}),
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
r
=
"http://yuqing.zhiweidata.com/qbjcbackPhoenix/"
,
c
=
"1561017600000"
;
function
i
(
t
,
e
,
n
){
if
(
console
.
log
(
t
),
console
.
log
(
n
),
"strong"
===
t
.
action
){
var
o
=
t
.
data
;
return
chrome
.
storage
.
local
.
get
(
"configure"
,
function
(
t
){
o
.
projectList
=
t
.
configure
}),
chrome
.
storage
.
local
.
get
(
"project"
,
function
(
t
){
o
.
project
=
t
.
project
}),
chrome
.
storage
.
local
.
get
(
"user"
,
function
(
t
){
o
.
user
=
t
.
user
}),
chrome
.
storage
.
local
.
get
(
"rightStatue"
,
function
(
t
){
Object
.
keys
(
t
).
length
>
0
&&
(
o
.
rightStatue
=
t
.
rightStatue
,
n
({
data
:
o
}))}),
!
0
}
if
(
"SetStrong"
===
t
.
action
)
chrome
.
storage
.
local
.
set
(
t
.
data
);
else
{
if
(
"getstrong"
===
t
.
action
)
return
chrome
.
storage
.
local
.
get
(
t
.
data
,
function
(
t
){
console
.
log
(
t
),
n
({
data
:
t
})}),
!
0
;
if
(
"checkUpmark"
===
t
.
action
){
var
i
=
t
.
params
.
project
,
u
=
null
,
l
=
null
;
return
l
=
"微博"
===
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
(
c
,
".do"
),{
company
:
i
,
mark
:
l
,
type
:
t
.
value
[
0
].
data
.
clientFrom
},{
headers
:{
time
:(
new
Date
).
valueOf
()}}).
then
(
function
(
t
){
u
=
t
.
data
,
console
.
log
(
55555555555
),
n
({
data
:
u
,
tabProject
:
i
})}).
catch
(
function
(
t
){
console
.
log
(
t
)}),
!
0
}
if
(
"doingMark"
===
t
.
action
)
return
a
.
a
.
post
(
""
.
concat
(
r
,
"interface/markDataMoreBiz/"
).
concat
(
c
,
".do"
),
t
.
value
,{
headers
:{
time
:(
new
Date
).
valueOf
()}}).
then
(
function
(
t
){
var
e
=
t
.
data
;
n
({
data
:
e
})}).
catch
(
function
(
t
){
console
.
log
(
t
)}),
!
0
;
if
(
"open"
===
t
.
action
);
else
{
if
(
"xhttp"
===
t
.
action
)
return
a
.
a
.
get
(
""
.
concat
(
r
).
concat
(
t
.
url
,
"/"
).
concat
(
c
,
".do"
),{
params
:
t
.
params
}).
then
(
function
(
t
){
console
.
log
(
t
),
n
({
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
),
n
({
data
:
t
.
data
})}).
catch
(
function
(
t
){
console
.
log
(
t
)}),
!
0
}}}
function
u
(){
a
.
a
.
get
(
""
.
concat
(
r
,
"interface/getGroupInfo/"
).
concat
(
c
,
".do"
)).
then
(
function
(
t
){
chrome
.
storage
.
local
.
set
({
configure
:
t
.
data
},
function
(){
console
.
log
(
"save success"
)})}).
catch
(
function
(
t
){
console
.
log
(
t
)})}
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
n
=
"
\
n
\
t var isInner = "
.
concat
(
e
,
"
\
n
\
t var direct = 'DIRECT;'
\
n
\
t var proxyinner = 'PROXY 192.168.0.36:31128'
\
n
\
t function FindProxyForURL(url, host) {
\
n
\
t if (shExpMatch(url,
\"
https:*weixin.sogou.com*
\"
) && isInner){
\
n
\
t return proxyinner
\
n
\
t } else {
\
n
\
t return direct;
\
n
\
t }
\
n
\
t }
\
n
\
t "
),
o
=
{
value
:{
mode
:
"pac_script"
,
pacScript
:{
data
:
n
,
mandatory
:
!
0
}},
scope
:
"regular"
};
chrome
.
proxy
.
settings
.
set
(
o
,
function
(){
console
.
log
(
"set success"
)})})}),
chrome
.
runtime
.
onMessageExternal
.
addListener
(
function
(
t
,
e
,
n
){
return
i
(
t
,
e
,
n
),
!
0
}),
chrome
.
runtime
.
onMessage
.
addListener
(
function
(
t
,
e
,
n
){
return
i
(
t
,
e
,
n
),
!
0
}),
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
(
e
),
e
?
console
.
log
(
"has get defaultURL"
):
u
()})}});
//# sourceMappingURL=background.js.map
\ No newline at end of file
out/js/background.js.map
View file @
9c536487
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/pages/background/background.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","background","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","chrome","management","getAll","console","log","id","find","item","description","storage","local","set","ExtensionID","axios","defaults","withCredentials","interceptors","response","use","status","message","notifications","Math","random","type","iconUrl","title","locationhost","timeUnix","getlistenerHandle","request","sender","sendResponse","action","strongObject","items","projectList","configure","project","user","keys","rightStatue","params","res","clientFrom","map","url","mark","mid","time","source","post","concat","company","headers","Date","valueOf","then","tabProject","catch","error","browserAction","setIcon","path","getAndSaveConfigure","document","addEventListener","method","origin","isInner","includes","pac","pacScript","mandatory","scope","proxy","settings","runtime","onMessageExternal","addListener","onMessage","onClicked","sync","isopen","contextMenus","onclick","alert","contexts","tabs","encodeURI","selectionText","_ref"],"mappings":"aACA,SAAAA,EAAAC,GAQA,IAPA,IAMAC,EAAAC,EANAC,EAAAH,EAAA,GACAI,EAAAJ,EAAA,GACAK,EAAAL,EAAA,GAIAM,EAAA,EAAAC,EAAA,GACQD,EAAAH,EAAAK,OAAoBF,IAC5BJ,EAAAC,EAAAG,GACAG,EAAAP,IACAK,EAAAG,KAAAD,EAAAP,GAAA,IAEAO,EAAAP,GAAA,EAEA,IAAAD,KAAAG,EACAO,OAAAC,UAAAC,eAAAC,KAAAV,EAAAH,KACAc,EAAAd,GAAAG,EAAAH,IAGAe,KAAAhB,GAEA,MAAAO,EAAAC,OACAD,EAAAU,OAAAV,GAOA,OAHAW,EAAAR,KAAAS,MAAAD,EAAAb,GAAA,IAGAe,IAEA,SAAAA,IAEA,IADA,IAAAC,EACAf,EAAA,EAAiBA,EAAAY,EAAAV,OAA4BF,IAAA,CAG7C,IAFA,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wE,QAAU,OAIvCnF,OAAOoF,aAAa/F,OAAO,CACzBqC,MAAO,SACP2D,QAAS,WAAWC,MAAM,gBAG5BtF,OAAOoF,aAAa/F,OAAO,CACzBqC,MAAO,YACP6D,SAAU,CAAC,aACXF,QAAS,SAAS3C,GAEhB1C,OAAOwF,KAAKnG,OAAO,CAACyD,IAAK,uCAAyC2C,UAAU/C,EAAOgD,oBAKvF1F,OAAOS,QAAQC,MAAM9B,IAAI,YAAa,SAAA+G,GAAwB,IAAbtD,EAAasD,EAAbtD,UAChDlC,QAAQC,IAAI,iBACZD,QAAQC,IAAIiC,GACNA,EAGHlC,QAAQC,IAAI,sBAFZ4D","file":"js/background.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"background\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/out/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([5,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import axios from 'axios';\r\n// 获取扩展程序id\r\nchrome.management.getAll(result => {\r\n\tconsole.log(888)\r\n\tlet id = result.find(item => {\r\n\t\treturn item.description === '知微舆情'\r\n\t}).id\r\n\tconsole.log(id)\r\n\tchrome.storage.local.set({'ExtensionID': id});\r\n})\r\n// 获取扩展程序id结束\r\n\r\naxios.defaults.withCredentials = true;\r\naxios.interceptors.response.use(response=> {\r\n// 对响应数据做点什么\r\n// 显示\r\n console.log(\"添加响应拦截器\", response)\r\n if (response.status === 200&&response.data&&response.data.message === '插件版本过低,请升级') {\r\n chrome.notifications.create(\r\n Math.random()+'',\r\n {\r\n type: 'basic',\r\n iconUrl: 'images/icon_19.png',\r\n title: '通知',\r\n message: '插件版本过低,请升级' \r\n }, (id) => {\r\n console.log(id);\r\n } \r\n )\r\n } else {\r\n return response\r\n }\r\n})\r\n\r\nlet status = true\r\n// 线上服务\r\nlet locationhost = `http://yuqing.zhiweidata.com/qbjcbackPhoenix/`\r\n// 本地服务\r\n//let locationhost = `http://192.168.0.241:8088/qbjcbackPhoenix/`\r\n\r\nlet timeUnix = '1561017600000' // 时间戳接口需求\r\n// 代理\r\n\tdocument.addEventListener(\"DOMContentLoaded\", function () {\r\n\t axios({\r\n\t url: 'https://httpbin.org/ip',\r\n\t method: 'GET',\r\n\t }).then((res) => {\r\n\t console.log(res.data.origin)\r\n\t let isInner = res.data.origin.includes('60.12.216.130')\r\n\t console.log(isInner)\r\n\t var pac = `\r\n\t var isInner = ${isInner}\r\n\t var direct = 'DIRECT;'\r\n\t var proxyinner = 'PROXY 192.168.0.36:31128'\r\n\t function FindProxyForURL(url, host) {\r\n\t if (shExpMatch(url, \"https:*weixin.sogou.com*\") && isInner){\r\n\t return proxyinner\r\n\t } else {\r\n\t return direct;\r\n\t }\r\n\t }\r\n\t `\r\n\t var data = {\r\n\t value:{\r\n\t mode:\"pac_script\",\r\n\t pacScript:{\r\n\t data:pac,\r\n\t mandatory:true\r\n\t }\r\n\t },\r\n\t scope:\"regular\"\r\n\t }\r\n\t chrome.proxy.settings.set(data,function(){\r\n\t console.log('set success')\r\n\t });\r\n\t })\r\n\t});\r\n// 代理结束\r\n\r\nfunction getlistenerHandle (request, sender, sendResponse) {\r\n console.log(request)\r\n console.log(sendResponse)\r\n if(request.action === 'strong') {\r\n let strongObject = request.data\r\n chrome.storage.local.get('configure', items => {\r\n strongObject.projectList = items.configure\r\n });\r\n chrome.storage.local.get('project', items => {\r\n strongObject.project = items.project\r\n });\r\n chrome.storage.local.get('user', items => {\r\n strongObject.user = items.user\r\n });\r\n chrome.storage.local.get('rightStatue', items => {\r\n if (Object.keys(items).length > 0) {\r\n strongObject.rightStatue = items.rightStatue\r\n sendResponse({data: strongObject});\r\n }\r\n });\r\n return true\r\n } else if(request.action === 'SetStrong') {\r\n // 存储数据\r\n chrome.storage.local.set(request.data)\r\n } else if(request.action === 'getstrong') {\r\n // 获取存储数据\r\n chrome.storage.local.get(request.data, items => {\r\n console.log(items)\r\n sendResponse({data: items});\r\n });\r\n return true\r\n } else if(request.action === 'checkUpmark') {\r\n // 检查选中的文本是否被标注事件\r\n let project = request.params.project\r\n let res = null\r\n let data = null\r\n if (request.value[0].data.clientFrom === '微博') {\r\n data = request.value.map(item => {\r\n return {\r\n id: item.data.id,\r\n url: item.data.url,\r\n mark: false,\r\n mid: item.data.mid,\r\n time: item.data.time\r\n }\r\n }) \r\n } else {\r\n data = request.value.map(item => {\r\n return {\r\n id: item.data.id,\r\n mark: false,\r\n source: item.data.source,\r\n time: item.data.time,\r\n title: item.data.title,\r\n url: item.data.url\r\n }\r\n })\r\n }\r\n axios.post(`${locationhost}interface/getDataMore/${timeUnix}.do`, {\r\n company: project,\r\n mark: data ,\r\n type: request.value[0].data.clientFrom\r\n }, {\r\n headers: { time: (new Date()).valueOf() }\r\n })\r\n .then(response => {\r\n res = response.data\r\n console.log(55555555555)\r\n sendResponse({data: res, tabProject: project});\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n });\r\n return true\r\n } else if (request.action === 'doingMark') {\r\n // 标注接口\r\n axios.post(`${locationhost}interface/markDataMoreBiz/${timeUnix}.do`, request.value, { headers: { time: (new Date()).valueOf() } })\r\n .then(response => {\r\n let res = response.data\r\n sendResponse({data: res});\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n });\r\n return true\r\n } else if(request.action === \"open\") {\r\n chrome.browserAction.setIcon({ path: 'images/icon.png' })\r\n } else if(request.action === \"xhttp\") {\r\n // ajax 请求\r\n axios.get(`${locationhost}${request.url}/${timeUnix}.do`, {\r\n params: request.params\r\n })\r\n .then(res => {\r\n console.log(res)\r\n sendResponse({data: res.data});\r\n }).catch(function (error) {\r\n console.log(error);\r\n });\r\n return true\r\n } else if(request.action === 'weiboxhttp') {\r\n axios.get(`${request.url}`)\r\n .then(res => {\r\n console.log(res)\r\n sendResponse({data: res.data});\r\n }).catch(function (error) {\r\n console.log(error);\r\n });\r\n return true\r\n }\r\n}\r\n\r\nchrome.runtime.onMessageExternal.addListener((request, sender, sendResponse) => {\r\n getlistenerHandle(request, sender, sendResponse)\r\n return true\r\n});\r\nchrome.runtime.onMessage.addListener((request, sender, sendResponse) => {\r\n getlistenerHandle(request, sender, sendResponse)\r\n return true\r\n});\r\n\r\nchrome.browserAction.setIcon({ path: 'images/icon.png' })\r\nchrome.browserAction.onClicked.addListener(function() {\r\n status = !status\r\n if (status) {\r\n chrome.browserAction.setIcon({ path: 'images/icon.png' })\r\n chrome.storage.sync.set({'isopen': true})\r\n } else {\r\n chrome.browserAction.setIcon({ path: 'images/icon2.png' })\r\n chrome.storage.sync.set({'isopen': false})\r\n }\r\n})\r\n\r\nchrome.contextMenus.create({\r\n title: \"测试右键菜单\",\r\n onclick: function(){alert('您点击了右键菜单!');}\r\n});\r\n\r\nchrome.contextMenus.create({\r\n title: '使用度娘搜索:%s', // %s表示选中的文字\r\n contexts: ['selection'], // 只有当选中文字时才会出现此右键菜单\r\n onclick: function(params)\r\n {\r\n chrome.tabs.create({url: 'https://www.baidu.com/s?ie=utf-8&wd=' + encodeURI(params.selectionText)});\r\n }\r\n});\r\n//getAndSaveConfigure()\r\n// 获取项目名以及项目名下的人员名单\r\nchrome.storage.local.get('configure', function({ configure }) {\r\n\tconsole.log('1234545487645')\r\n\tconsole.log(configure)\r\n if (!configure) {\r\n getAndSaveConfigure()\r\n } else {\r\n console.log('has get defaultURL')\r\n }\r\n})\r\nfunction getAndSaveConfigure () {\r\n axios.get(`${locationhost}interface/getGroupInfo/${timeUnix}.do`)\r\n .then(res => {\r\n chrome.storage.local.set({\r\n 'configure': res.data\r\n }, () => {\r\n console.log(`save success`)\r\n })\r\n }).catch(function (error) {\r\n console.log(error);\r\n });\r\n}\r\n// 获取项目名以及项目名下的人员名单结束\r\n\r\n\r\n\r\n"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/pages/background/background.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","background","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","chrome","management","getAll","console","log","id","find","item","description","storage","local","set","ExtensionID","axios","defaults","withCredentials","interceptors","response","use","status","message","notifications","Math","random","type","iconUrl","title","locationhost","timeUnix","getlistenerHandle","request","sender","sendResponse","action","strongObject","items","projectList","configure","project","user","keys","rightStatue","params","res","clientFrom","map","url","mark","mid","time","source","post","concat","company","headers","Date","valueOf","then","tabProject","catch","error","getAndSaveConfigure","document","addEventListener","method","origin","isInner","includes","pac","pacScript","mandatory","scope","proxy","settings","runtime","onMessageExternal","addListener","onMessage","contextMenus","onclick","alert","contexts","tabs","encodeURI","selectionText","_ref"],"mappings":"aACA,SAAAA,EAAAC,GAQA,IAPA,IAMAC,EAAAC,EANAC,EAAAH,EAAA,GACAI,EAAAJ,EAAA,GACAK,EAAAL,EAAA,GAIAM,EAAA,EAAAC,EAAA,GACQD,EAAAH,EAAAK,OAAoBF,IAC5BJ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AH,EAAkBC,EAASC,EAAQC,IAC5B,IAGThC,OAAO8E,aAAazF,OAAO,CACzBqC,MAAO,SACPqD,QAAS,WAAWC,MAAM,gBAG5BhF,OAAO8E,aAAazF,OAAO,CACzBqC,MAAO,YACPuD,SAAU,CAAC,aACXF,QAAS,SAASrC,GAEhB1C,OAAOkF,KAAK7F,OAAO,CAACyD,IAAK,uCAAyCqC,UAAUzC,EAAO0C,oBAKvFpF,OAAOS,QAAQC,MAAM9B,IAAI,YAAa,SAAAyG,GAAwB,IAAbhD,EAAagD,EAAbhD,UAChDlC,QAAQC,IAAIiC,GACNA,EAGHlC,QAAQC,IAAI,sBAFZyD","file":"js/background.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"background\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/out/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([5,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import axios from 'axios';\r\n// 获取扩展程序id\r\nchrome.management.getAll(result => {\r\n\tconsole.log(888)\r\n\tlet id = result.find(item => {\r\n\t\treturn item.description === '知微舆情'\r\n\t}).id\r\n\tconsole.log(id)\r\n\tchrome.storage.local.set({'ExtensionID': id});\r\n})\r\n// 获取扩展程序id结束\r\n\r\naxios.defaults.withCredentials = true;\r\naxios.interceptors.response.use(response=> {\r\n// 对响应数据做点什么\r\n// 显示\r\n console.log(\"添加响应拦截器\", response)\r\n if (response.status === 200&&response.data&&response.data.message === '插件版本过低,请升级') {\r\n chrome.notifications.create(\r\n Math.random()+'',\r\n {\r\n type: 'basic',\r\n iconUrl: 'images/icon_19.png',\r\n title: '通知',\r\n message: '插件版本过低,请升级' \r\n }, (id) => {\r\n console.log(id);\r\n } \r\n )\r\n } else {\r\n return response\r\n }\r\n})\r\n\r\nlet status = true\r\n// 线上服务\r\nlet locationhost = `http://yuqing.zhiweidata.com/qbjcbackPhoenix/`\r\n// 本地服务\r\n//let locationhost = `http://192.168.0.241:8088/qbjcbackPhoenix/`\r\n\r\nlet timeUnix = '1561017600000' // 时间戳接口需求\r\n// 代理\r\n\tdocument.addEventListener(\"DOMContentLoaded\", function () {\r\n\t axios({\r\n\t url: 'https://httpbin.org/ip',\r\n\t method: 'GET',\r\n\t }).then((res) => {\r\n\t console.log(res.data.origin)\r\n\t let isInner = res.data.origin.includes('60.12.216.130')\r\n\t console.log(isInner)\r\n\t var pac = `\r\n\t var isInner = ${isInner}\r\n\t var direct = 'DIRECT;'\r\n\t var proxyinner = 'PROXY 192.168.0.36:31128'\r\n\t function FindProxyForURL(url, host) {\r\n\t if (shExpMatch(url, \"https:*weixin.sogou.com*\") && isInner){\r\n\t return proxyinner\r\n\t } else {\r\n\t return direct;\r\n\t }\r\n\t }\r\n\t `\r\n\t var data = {\r\n\t value:{\r\n\t mode:\"pac_script\",\r\n\t pacScript:{\r\n\t data:pac,\r\n\t mandatory:true\r\n\t }\r\n\t },\r\n\t scope:\"regular\"\r\n\t }\r\n\t chrome.proxy.settings.set(data,function(){\r\n\t console.log('set success')\r\n\t });\r\n\t })\r\n\t});\r\n// 代理结束\r\n\r\nfunction getlistenerHandle (request, sender, sendResponse) {\r\n console.log(request)\r\n console.log(sendResponse)\r\n if(request.action === 'strong') {\r\n let strongObject = request.data\r\n chrome.storage.local.get('configure', items => {\r\n strongObject.projectList = items.configure\r\n });\r\n chrome.storage.local.get('project', items => {\r\n strongObject.project = items.project\r\n });\r\n chrome.storage.local.get('user', items => {\r\n strongObject.user = items.user\r\n });\r\n chrome.storage.local.get('rightStatue', items => {\r\n if (Object.keys(items).length > 0) {\r\n strongObject.rightStatue = items.rightStatue\r\n sendResponse({data: strongObject});\r\n }\r\n });\r\n return true\r\n } else if(request.action === 'SetStrong') {\r\n // 存储数据\r\n chrome.storage.local.set(request.data)\r\n } else if(request.action === 'getstrong') {\r\n // 获取存储数据\r\n chrome.storage.local.get(request.data, items => {\r\n console.log(items)\r\n sendResponse({data: items});\r\n });\r\n return true\r\n } else if(request.action === 'checkUpmark') {\r\n // 检查选中的文本是否被标注事件\r\n let project = request.params.project\r\n let res = null\r\n let data = null\r\n if (request.value[0].data.clientFrom === '微博') {\r\n data = request.value.map(item => {\r\n return {\r\n id: item.data.id,\r\n url: item.data.url,\r\n mark: false,\r\n mid: item.data.mid,\r\n time: item.data.time\r\n }\r\n }) \r\n } else {\r\n data = request.value.map(item => {\r\n return {\r\n id: item.data.id,\r\n mark: false,\r\n source: item.data.source,\r\n time: item.data.time,\r\n title: item.data.title,\r\n url: item.data.url\r\n }\r\n })\r\n }\r\n axios.post(`${locationhost}interface/getDataMore/${timeUnix}.do`, {\r\n company: project,\r\n mark: data ,\r\n type: request.value[0].data.clientFrom\r\n }, {\r\n headers: { time: (new Date()).valueOf() }\r\n })\r\n .then(response => {\r\n res = response.data\r\n console.log(55555555555)\r\n sendResponse({data: res, tabProject: project});\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n });\r\n return true\r\n } else if (request.action === 'doingMark') {\r\n // 标注接口\r\n axios.post(`${locationhost}interface/markDataMoreBiz/${timeUnix}.do`, request.value, { headers: { time: (new Date()).valueOf() } })\r\n .then(response => {\r\n let res = response.data\r\n sendResponse({data: res});\r\n })\r\n .catch(error => {\r\n console.log(error);\r\n });\r\n return true\r\n } else if(request.action === \"open\") {\r\n// chrome.browserAction.setIcon({ path: 'images/icon.png' })\r\n } else if(request.action === \"xhttp\") {\r\n // ajax 请求\r\n axios.get(`${locationhost}${request.url}/${timeUnix}.do`, {\r\n params: request.params\r\n })\r\n .then(res => {\r\n console.log(res)\r\n sendResponse({data: res.data});\r\n }).catch(function (error) {\r\n console.log(error);\r\n });\r\n return true\r\n } else if(request.action === 'weiboxhttp') {\r\n axios.get(`${request.url}`)\r\n .then(res => {\r\n console.log(res)\r\n sendResponse({data: res.data});\r\n }).catch(function (error) {\r\n console.log(error);\r\n });\r\n return true\r\n }\r\n}\r\n\r\nchrome.runtime.onMessageExternal.addListener((request, sender, sendResponse) => {\r\n getlistenerHandle(request, sender, sendResponse)\r\n return true\r\n});\r\nchrome.runtime.onMessage.addListener((request, sender, sendResponse) => {\r\n getlistenerHandle(request, sender, sendResponse)\r\n return true\r\n});\r\n\r\nchrome.contextMenus.create({\r\n title: \"测试右键菜单\",\r\n onclick: function(){alert('您点击了右键菜单!');}\r\n});\r\n\r\nchrome.contextMenus.create({\r\n title: '使用度娘搜索:%s', // %s表示选中的文字\r\n contexts: ['selection'], // 只有当选中文字时才会出现此右键菜单\r\n onclick: function(params)\r\n {\r\n chrome.tabs.create({url: 'https://www.baidu.com/s?ie=utf-8&wd=' + encodeURI(params.selectionText)});\r\n }\r\n});\r\n//getAndSaveConfigure()\r\n// 获取项目名以及项目名下的人员名单\r\nchrome.storage.local.get('configure', function({ configure }) {\r\n\tconsole.log(configure)\r\n if (!configure) {\r\n getAndSaveConfigure()\r\n } else {\r\n console.log('has get defaultURL')\r\n }\r\n})\r\nfunction getAndSaveConfigure () {\r\n axios.get(`${locationhost}interface/getGroupInfo/${timeUnix}.do`)\r\n .then(res => {\r\n chrome.storage.local.set({\r\n 'configure': res.data\r\n }, () => {\r\n console.log(`save success`)\r\n })\r\n }).catch(function (error) {\r\n console.log(error);\r\n });\r\n}\r\n// 获取项目名以及项目名下的人员名单结束\r\n\r\n\r\n\r\n"],"sourceRoot":""}
\ No newline at end of file
out/js/popup.js
View file @
9c536487
(
function
(
e
){
function
t
(
t
){
for
(
var
r
,
c
,
u
=
t
[
0
],
l
=
t
[
1
],
a
=
t
[
2
],
p
=
0
,
f
=
[];
p
<
u
.
length
;
p
++
)
c
=
u
[
p
],
i
[
c
]
&&
f
.
push
(
i
[
c
][
0
]),
i
[
c
]
=
0
;
for
(
r
in
l
)
Object
.
prototype
.
hasOwnProperty
.
call
(
l
,
r
)
&&
(
e
[
r
]
=
l
[
r
]);
s
&&
s
(
t
);
while
(
f
.
length
)
f
.
shift
()();
return
o
.
push
.
apply
(
o
,
a
||
[]),
n
()}
function
n
(){
for
(
var
e
,
t
=
0
;
t
<
o
.
length
;
t
++
){
for
(
var
n
=
o
[
t
],
r
=!
0
,
u
=
1
;
u
<
n
.
length
;
u
++
){
var
l
=
n
[
u
];
0
!==
i
[
l
]
&&
(
r
=!
1
)}
r
&&
(
o
.
splice
(
t
--
,
1
),
e
=
c
(
c
.
s
=
n
[
0
]))}
return
e
}
var
r
=
{},
i
=
{
popup
:
0
},
o
=
[];
function
c
(
t
){
if
(
r
[
t
])
return
r
[
t
].
exports
;
var
n
=
r
[
t
]
=
{
i
:
t
,
l
:
!
1
,
exports
:{}};
return
e
[
t
].
call
(
n
.
exports
,
n
,
n
.
exports
,
c
),
n
.
l
=!
0
,
n
.
exports
}
c
.
m
=
e
,
c
.
c
=
r
,
c
.
d
=
function
(
e
,
t
,
n
){
c
.
o
(
e
,
t
)
||
Object
.
defineProperty
(
e
,
t
,{
enumerable
:
!
0
,
get
:
n
})},
c
.
r
=
function
(
e
){
"undefined"
!==
typeof
Symbol
&&
Symbol
.
toStringTag
&&
Object
.
defineProperty
(
e
,
Symbol
.
toStringTag
,{
value
:
"Module"
}),
Object
.
defineProperty
(
e
,
"__esModule"
,{
value
:
!
0
})},
c
.
t
=
function
(
e
,
t
){
if
(
1
&
t
&&
(
e
=
c
(
e
)),
8
&
t
)
return
e
;
if
(
4
&
t
&&
"object"
===
typeof
e
&&
e
&&
e
.
__esModule
)
return
e
;
var
n
=
Object
.
create
(
null
);
if
(
c
.
r
(
n
),
Object
.
defineProperty
(
n
,
"default"
,{
enumerable
:
!
0
,
value
:
e
}),
2
&
t
&&
"string"
!=
typeof
e
)
for
(
var
r
in
e
)
c
.
d
(
n
,
r
,
function
(
t
){
return
e
[
t
]}.
bind
(
null
,
r
));
return
n
},
c
.
n
=
function
(
e
){
var
t
=
e
&&
e
.
__esModule
?
function
(){
return
e
[
"default"
]}:
function
(){
return
e
};
return
c
.
d
(
t
,
"a"
,
t
),
t
},
c
.
o
=
function
(
e
,
t
){
return
Object
.
prototype
.
hasOwnProperty
.
call
(
e
,
t
)},
c
.
p
=
"/out/"
;
var
u
=
window
[
"webpackJsonp"
]
=
window
[
"webpackJsonp"
]
||
[],
l
=
u
.
push
.
bind
(
u
);
u
.
push
=
t
,
u
=
u
.
slice
();
for
(
var
a
=
0
;
a
<
u
.
length
;
a
++
)
t
(
u
[
a
]);
var
s
=
l
;
o
.
push
([
1
,
"chunk-vendors"
]),
n
()})({
1
:
function
(
e
,
t
,
n
){
e
.
exports
=
n
(
"7331"
)},
7331
:
function
(
e
,
t
,
n
){
"use strict"
;
n
.
r
(
t
);
n
(
"cadf"
),
n
(
"551c"
),
n
(
"f751"
),
n
(
"097d"
);
var
r
=
n
(
"2b0e"
),
i
=
function
(){
var
e
=
this
,
t
=
e
.
$createElement
,
n
=
e
.
_self
.
_c
||
t
;
return
n
(
"div"
,{
staticClass
:
"main_popup"
},[
n
(
"div"
,{
staticClass
:
"index container"
},[
n
(
"label"
,{
staticClass
:
"switch"
,
attrs
:{
for
:
"switch"
}},[
n
(
"input"
,{
directives
:[{
name
:
"model"
,
rawName
:
"v-model"
,
value
:
e
.
switchPlugin
,
expression
:
"switchPlugin"
}],
attrs
:{
type
:
"checkbox"
,
name
:
"zhiwei_plugin_switch"
,
id
:
"switch"
,
hidden
:
""
,
"true-value"
:
!
0
,
"false-value"
:
!
1
},
domProps
:{
checked
:
Array
.
isArray
(
e
.
switchPlugin
)?
e
.
_i
(
e
.
switchPlugin
,
null
)
>-
1
:
e
.
switchPlugin
},
on
:{
change
:
function
(
t
){
var
n
=
e
.
switchPlugin
,
r
=
t
.
target
,
i
=!!
r
.
checked
;
if
(
Array
.
isArray
(
n
)){
var
o
=
null
,
c
=
e
.
_i
(
n
,
o
);
r
.
checked
?
c
<
0
&&
(
e
.
switchPlugin
=
n
.
concat
([
o
])):
c
>-
1
&&
(
e
.
switchPlugin
=
n
.
slice
(
0
,
c
).
concat
(
n
.
slice
(
c
+
1
)))}
else
e
.
switchPlugin
=
i
}}}),
n
(
"span"
,{
staticClass
:
"slide"
})])])])},
o
=
[],
c
=
{
name
:
"popup"
,
data
:
function
(){
return
{
switchPlugin
:
!
0
}},
mounted
:
function
(){
var
e
=
this
;
chrome
.
storage
.
local
.
get
(
"pluginSwitch"
,
function
(
t
){
t
.
hasOwnProperty
(
"pluginSwitch"
)
&&
(
e
.
switchPlugin
=
t
.
pluginSwitch
)})},
watch
:{
switchPlugin
:
function
(
e
,
t
){
console
.
log
(
1212121212
),
console
.
log
(
e
);
var
n
=
chrome
.
storage
.
local
;
n
.
set
({
pluginSwitch
:
e
})}}},
u
=
c
,
l
=
(
n
(
"aef3"
),
n
(
"2877"
)),
a
=
Object
(
l
[
"a"
])(
u
,
i
,
o
,
!
1
,
null
,
"d39105b4"
,
null
),
s
=
a
.
exports
;
r
[
"a"
].
config
.
productionTip
=!
1
,
new
r
[
"a"
]({
el
:
"#popup"
,
render
:
function
(
e
){
return
e
(
s
)}})},
aef3
:
function
(
e
,
t
,
n
){
"use strict"
;
var
r
=
n
(
"ee26"
),
i
=
n
.
n
(
r
);
i
.
a
},
ee26
:
function
(
e
,
t
,
n
){
}});
(
function
(
e
){
function
t
(
t
){
for
(
var
r
,
o
,
u
=
t
[
0
],
l
=
t
[
1
],
s
=
t
[
2
],
f
=
0
,
p
=
[];
f
<
u
.
length
;
f
++
)
o
=
u
[
f
],
i
[
o
]
&&
p
.
push
(
i
[
o
][
0
]),
i
[
o
]
=
0
;
for
(
r
in
l
)
Object
.
prototype
.
hasOwnProperty
.
call
(
l
,
r
)
&&
(
e
[
r
]
=
l
[
r
]);
a
&&
a
(
t
);
while
(
p
.
length
)
p
.
shift
()();
return
c
.
push
.
apply
(
c
,
s
||
[]),
n
()}
function
n
(){
for
(
var
e
,
t
=
0
;
t
<
c
.
length
;
t
++
){
for
(
var
n
=
c
[
t
],
r
=!
0
,
u
=
1
;
u
<
n
.
length
;
u
++
){
var
l
=
n
[
u
];
0
!==
i
[
l
]
&&
(
r
=!
1
)}
r
&&
(
c
.
splice
(
t
--
,
1
),
e
=
o
(
o
.
s
=
n
[
0
]))}
return
e
}
var
r
=
{},
i
=
{
popup
:
0
},
c
=
[];
function
o
(
t
){
if
(
r
[
t
])
return
r
[
t
].
exports
;
var
n
=
r
[
t
]
=
{
i
:
t
,
l
:
!
1
,
exports
:{}};
return
e
[
t
].
call
(
n
.
exports
,
n
,
n
.
exports
,
o
),
n
.
l
=!
0
,
n
.
exports
}
o
.
m
=
e
,
o
.
c
=
r
,
o
.
d
=
function
(
e
,
t
,
n
){
o
.
o
(
e
,
t
)
||
Object
.
defineProperty
(
e
,
t
,{
enumerable
:
!
0
,
get
:
n
})},
o
.
r
=
function
(
e
){
"undefined"
!==
typeof
Symbol
&&
Symbol
.
toStringTag
&&
Object
.
defineProperty
(
e
,
Symbol
.
toStringTag
,{
value
:
"Module"
}),
Object
.
defineProperty
(
e
,
"__esModule"
,{
value
:
!
0
})},
o
.
t
=
function
(
e
,
t
){
if
(
1
&
t
&&
(
e
=
o
(
e
)),
8
&
t
)
return
e
;
if
(
4
&
t
&&
"object"
===
typeof
e
&&
e
&&
e
.
__esModule
)
return
e
;
var
n
=
Object
.
create
(
null
);
if
(
o
.
r
(
n
),
Object
.
defineProperty
(
n
,
"default"
,{
enumerable
:
!
0
,
value
:
e
}),
2
&
t
&&
"string"
!=
typeof
e
)
for
(
var
r
in
e
)
o
.
d
(
n
,
r
,
function
(
t
){
return
e
[
t
]}.
bind
(
null
,
r
));
return
n
},
o
.
n
=
function
(
e
){
var
t
=
e
&&
e
.
__esModule
?
function
(){
return
e
[
"default"
]}:
function
(){
return
e
};
return
o
.
d
(
t
,
"a"
,
t
),
t
},
o
.
o
=
function
(
e
,
t
){
return
Object
.
prototype
.
hasOwnProperty
.
call
(
e
,
t
)},
o
.
p
=
"/out/"
;
var
u
=
window
[
"webpackJsonp"
]
=
window
[
"webpackJsonp"
]
||
[],
l
=
u
.
push
.
bind
(
u
);
u
.
push
=
t
,
u
=
u
.
slice
();
for
(
var
s
=
0
;
s
<
u
.
length
;
s
++
)
t
(
u
[
s
]);
var
a
=
l
;
c
.
push
([
1
,
"chunk-vendors"
]),
n
()})({
1
:
function
(
e
,
t
,
n
){
e
.
exports
=
n
(
"7331"
)},
"64be"
:
function
(
e
,
t
,
n
){},
7331
:
function
(
e
,
t
,
n
){
"use strict"
;
n
.
r
(
t
);
n
(
"cadf"
),
n
(
"551c"
),
n
(
"f751"
),
n
(
"097d"
);
var
r
=
n
(
"2b0e"
),
i
=
function
(){
var
e
=
this
,
t
=
e
.
$createElement
,
n
=
e
.
_self
.
_c
||
t
;
return
n
(
"div"
,{
staticClass
:
"main_popup"
},[
n
(
"div"
,{
staticClass
:
"index container"
},[
e
.
_v
(
"
\
n dfgsdfgsdfgsdfgsdfgsdfgsdfg
\
n "
),
n
(
"label"
,{
staticClass
:
"switch"
,
attrs
:{
for
:
"switch"
}},[
n
(
"input"
,{
directives
:[{
name
:
"model"
,
rawName
:
"v-model"
,
value
:
e
.
switchPlugin
,
expression
:
"switchPlugin"
}],
attrs
:{
type
:
"checkbox"
,
name
:
"zhiwei_plugin_switch"
,
id
:
"switch"
,
hidden
:
""
,
"true-value"
:
!
0
,
"false-value"
:
!
1
},
domProps
:{
checked
:
Array
.
isArray
(
e
.
switchPlugin
)?
e
.
_i
(
e
.
switchPlugin
,
null
)
>-
1
:
e
.
switchPlugin
},
on
:{
change
:
function
(
t
){
var
n
=
e
.
switchPlugin
,
r
=
t
.
target
,
i
=!!
r
.
checked
;
if
(
Array
.
isArray
(
n
)){
var
c
=
null
,
o
=
e
.
_i
(
n
,
c
);
r
.
checked
?
o
<
0
&&
(
e
.
switchPlugin
=
n
.
concat
([
c
])):
o
>-
1
&&
(
e
.
switchPlugin
=
n
.
slice
(
0
,
o
).
concat
(
n
.
slice
(
o
+
1
)))}
else
e
.
switchPlugin
=
i
}}}),
n
(
"span"
,{
staticClass
:
"slide"
})])])])},
c
=
[],
o
=
{
name
:
"popup"
,
data
:
function
(){
return
{
switchPlugin
:
!
0
}},
mounted
:
function
(){
var
e
=
this
;
chrome
.
storage
.
local
.
get
(
"pluginSwitch"
,
function
(
t
){
t
.
hasOwnProperty
(
"pluginSwitch"
)
&&
(
e
.
switchPlugin
=
t
.
pluginSwitch
)})},
watch
:{
switchPlugin
:
function
(
e
,
t
){
console
.
log
(
1212121212
),
console
.
log
(
e
);
var
n
=
chrome
.
storage
.
local
;
n
.
set
({
pluginSwitch
:
e
})}}},
u
=
o
,
l
=
(
n
(
"f46b"
),
n
(
"2877"
)),
s
=
Object
(
l
[
"a"
])(
u
,
i
,
c
,
!
1
,
null
,
"409cdc1c"
,
null
),
a
=
s
.
exports
;
r
[
"a"
].
config
.
productionTip
=!
1
,
new
r
[
"a"
]({
el
:
"#popup"
,
render
:
function
(
e
){
return
e
(
a
)}})},
f46b
:
function
(
e
,
t
,
n
){
"use strict"
;
var
r
=
n
(
"64be"
),
i
=
n
.
n
(
r
);
i
.
a
}});
//# sourceMappingURL=popup.js.map
\ No newline at end of file
out/js/popup.js.map
View file @
9c536487
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/components/popup.vue?5897","webpack:///src/components/popup.vue","webpack:///./src/components/popup.vue?fe72","webpack:///./src/components/popup.vue","webpack:///./src/pages/popup/popup.js","webpack:///./src/components/popup.vue?e59c"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","popup","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","popupvue_type_template_id_d39105b4_scoped_true_render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","for","directives","rawName","expression","type","id","hidden","true-value","false-value","domProps","checked","Array","isArray","switchPlugin","_i","on","change","$event","$$a","$$el","target","$$c","$$v","$$i","concat","staticRenderFns","popupvue_type_script_lang_js_","mounted","_this","chrome","storage","local","pluginSwitch","watch","newVal","oldVal","console","log","set","components_popupvue_type_script_lang_js_","component","componentNormalizer","Vue","config","productionTip","el","render","h","Popup","_node_modules_mini_css_extract_plugin_0_7_0_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_7_1_0_sass_loader_lib_loader_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_popup_vue_vue_type_style_index_0_id_d39105b4_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_0_7_0_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_7_1_0_sass_loader_lib_loader_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_popup_vue_vue_type_style_index_0_id_d39105b4_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0___default"],"mappings":"aACA,SAAAA,EAAAC,GAQA,IAPA,IAMAC,EAAAC,EANAC,EAAAH,EAAA,GACAI,EAAAJ,EAAA,GACAK,EAAAL,EAAA,GAIAM,EAAA,EAAAC,EAAA,GACQD,EAAAH,EAAAK,OAAoBF,IAC5BJ,EAAAC,EAAAG,GACAG,EAAAP,IACAK,EAAAG,KAAAD,EAAAP,GAAA,IAEAO,EAAAP,GAAA,EAEA,IAAAD,KAAAG,EACAO,OAAAC,UAAAC,eAAAC,KAAAV,EAAAH,KACAc,EAAAd,GAAAG,EAAAH,IAGAe,KAAAhB,GAEA,MAAAO,EAAAC,OACAD,EAAAU,OAAAV,GAOA,OAHAW,EAAAR,KAAAS,MAAAD,EAAAb,GAAA,IAGAe,IAEA,SAAAA,IAEA,IADA,IAAAC,EACAf,EAAA,EAAiBA,EAAAY,EAAAV,OAA4BF,IAAA,CAG7C,IAFA,IAAAgB,EAAAJ,EAAAZ,GACAiB,GAAA,EACAC,EAAA,EAAkBA,EAAAF,EAAAd,OAA2BgB,IAAA,CAC7C,IAAAC,EAAAH,EAAAE,GACA,IAAAf,EAAAgB,KAAAF,GAAA,GAEAA,IACAL,EAAAQ,OAAApB,IAAA,GACAe,EAAAM,IAAAC,EAAAN,EAAA,KAGA,OAAAD,EAIA,IAAAQ,EAAA,GAKApB,EAAA,CACAqB,MAAA,GAGAZ,EAAA,GAGA,SAAAS,EAAA1B,GAGA,GAAA4B,EAAA5B,GACA,OAAA4B,EAAA5B,GAAA8B,QAGA,IAAAC,EAAAH,EAAA5B,GAAA,CACAK,EAAAL,EACAgC,GAAA,EACAF,QAAA,IAUA,OANAhB,EAAAd,GAAAa,KAAAkB,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKA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AAC,GACAC,QAAAC,IAAA,YACAD,QAAAC,IAAAH,GACA,IAAAJ,EAAAD,OAAAC,QAAAC,MACAD,EAAAQ,IAAA,CACAN,aAAAE,OCtC+UK,EAAA,0BCQ/UC,EAAgBpG,OAAAqG,EAAA,KAAArG,CACdmG,EACAhD,EACAkC,GACF,EACA,KACA,WACA,MAIelE,EAAAiF,UChBfE,OAAIC,OAAOC,eAAgB,EAE3B,IAAIF,OAAI,CACNG,GAAI,SACJC,OAAQ,SAAAC,GAAC,OAAIA,EAAEC,yCCPjB,IAAAC,EAAA7F,EAAA,QAAA8F,EAAA9F,EAAA2B,EAAAkE,GAAmlBC,EAAG","file":"js/popup.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"popup\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/out/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([1,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"main_popup\"},[_c('div',{staticClass:\"index container\"},[_c('label',{staticClass:\"switch\",attrs:{\"for\":\"switch\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.switchPlugin),expression:\"switchPlugin\"}],attrs:{\"type\":\"checkbox\",\"name\":\"zhiwei_plugin_switch\",\"id\":\"switch\",\"hidden\":\"\",\"true-value\":true,\"false-value\":false},domProps:{\"checked\":Array.isArray(_vm.switchPlugin)?_vm._i(_vm.switchPlugin,null)>-1:(_vm.switchPlugin)},on:{\"change\":function($event){var $$a=_vm.switchPlugin,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.switchPlugin=$$a.concat([$$v]))}else{$$i>-1&&(_vm.switchPlugin=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.switchPlugin=$$c}}}}),_c('span',{staticClass:\"slide\"})])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"main_popup\">\r\n <div class='index container'>\r\n <label class=\"switch\" for=\"switch\">\r\n <input type=\"checkbox\"\r\n name=\"zhiwei_plugin_switch\"\r\n id=\"switch\"\r\n hidden\r\n :true-value=\"true\"\r\n :false-value=\"false\"\r\n v-model=\"switchPlugin\">\r\n <span class=\"slide\"></span>\r\n </label>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\n export default {\r\n name: 'popup',\r\n data () {\r\n return {\r\n switchPlugin: true\r\n }\r\n },\r\n mounted() {\r\n chrome.storage.local.get('pluginSwitch', result => {\r\n if (result.hasOwnProperty(\"pluginSwitch\")) {\r\n this.switchPlugin = result.pluginSwitch\r\n }\r\n })\r\n },\r\n watch: {\r\n switchPlugin (newVal, oldVal) {\r\n \tconsole.log(1212121212)\r\n \tconsole.log(newVal)\r\n let storage = chrome.storage.local\r\n storage.set({\r\n 'pluginSwitch': newVal\r\n })\r\n }\r\n }\r\n }\r\n</script>\r\n\r\n<style scoped lang=\"scss\">\r\n .main_popup{\r\n width: 200px;\r\n height: 100px;\r\n }\r\n \r\n .index {\r\n width: 100%;\r\n height:100%;\r\n font-size: 12px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n flex-flow:row nowrap;\r\n .switch{\r\n display: inline-block;\r\n width:76px;\r\n height:36px;\r\n padding: 3px;\r\n position: relative;\r\n &:hover{\r\n cursor: pointer;\r\n }\r\n }\r\n .slide{\r\n position: absolute;\r\n left:0;\r\n right:0;\r\n bottom: 0;\r\n top:0;\r\n background: #ccc;\r\n border-radius: 36px;\r\n }\r\n .slide:before{\r\n margin: 3px;\r\n content: 'OFF';\r\n display: inline-block;\r\n position: absolute;\r\n left:0;\r\n top:0;\r\n width:30px;\r\n height: 30px;\r\n line-height: 30px;\r\n text-align: center;\r\n background: #fff;\r\n border-radius: 50%;\r\n transition: all 0.3s linear;\r\n box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3);\r\n font-size: 12px;\r\n }\r\n #switch:checked + .slide {\r\n background: #2196F3;\r\n }\r\n #switch:checked + .slide:before{\r\n content: 'ON';\r\n transform: translate(40px, 0);\r\n box-shadow: -2px 2px 2px rgba(0, 0, 0, 0.3);\r\n }\r\n }\r\n\r\n</style>","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./popup.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./popup.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./popup.vue?vue&type=template&id=d39105b4&scoped=true&\"\nimport script from \"./popup.vue?vue&type=script&lang=js&\"\nexport * from \"./popup.vue?vue&type=script&lang=js&\"\nimport style0 from \"./popup.vue?vue&type=style&index=0&id=d39105b4&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"d39105b4\",\n null\n \n)\n\nexport default component.exports","import Vue from 'vue'\r\nimport Popup from '@/components/popup.vue'\r\n\r\nVue.config.productionTip = false\r\n/* eslint-disable no-new */\r\nnew Vue({\r\n el: '#popup',\r\n render: h => h(Popup)\r\n})\r\n","import mod from \"-!../../node_modules/_mini-css-extract-plugin@0.7.0@mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/_sass-loader@7.1.0@sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./popup.vue?vue&type=style&index=0&id=d39105b4&scoped=true&lang=scss&\"; export default mod; export * from \"-!../../node_modules/_mini-css-extract-plugin@0.7.0@mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/_sass-loader@7.1.0@sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./popup.vue?vue&type=style&index=0&id=d39105b4&scoped=true&lang=scss&\""],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/components/popup.vue?6dfc","webpack:///src/components/popup.vue","webpack:///./src/components/popup.vue?fe72","webpack:///./src/components/popup.vue","webpack:///./src/pages/popup/popup.js","webpack:///./src/components/popup.vue?fc7b"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","popup","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","popupvue_type_template_id_409cdc1c_scoped_true_render","_vm","this","_h","$createElement","_c","_self","staticClass","_v","attrs","for","directives","rawName","expression","type","id","hidden","true-value","false-value","domProps","checked","Array","isArray","switchPlugin","_i","on","change","$event","$$a","$$el","target","$$c","$$v","$$i","concat","staticRenderFns","popupvue_type_script_lang_js_","mounted","_this","chrome","storage","local","pluginSwitch","watch","newVal","oldVal","console","log","set","components_popupvue_type_script_lang_js_","component","componentNormalizer","Vue","config","productionTip","el","render","h","Popup","_node_modules_mini_css_extract_plugin_0_7_0_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_7_1_0_sass_loader_lib_loader_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_popup_vue_vue_type_style_index_0_id_409cdc1c_scoped_true_lang_scss___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_0_7_0_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_7_1_0_sass_loader_lib_loader_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist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B,aADA,SACAqB,EAAAC,GACAC,QAAAC,IAAA,YACAD,QAAAC,IAAAH,GACA,IAAAJ,EAAAD,OAAAC,QAAAC,MACAD,EAAAQ,IAAA,CACAN,aAAAE,OCvC+UK,EAAA,0BCQ/UC,EAAgBrG,OAAAsG,EAAA,KAAAtG,CACdoG,EACAjD,EACAmC,GACF,EACA,KACA,WACA,MAIenE,EAAAkF,UChBfE,OAAIC,OAAOC,eAAgB,EAE3B,IAAIF,OAAI,CACNG,GAAI,SACJC,OAAQ,SAAAC,GAAC,OAAIA,EAAEC,yCCPjB,IAAAC,EAAA9F,EAAA,QAAA+F,EAAA/F,EAAA2B,EAAAmE,GAAmlBC,EAAG","file":"js/popup.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"popup\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/out/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([1,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"main_popup\"},[_c('div',{staticClass:\"index container\"},[_vm._v(\"\\n dfgsdfgsdfgsdfgsdfgsdfgsdfg\\n \"),_c('label',{staticClass:\"switch\",attrs:{\"for\":\"switch\"}},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.switchPlugin),expression:\"switchPlugin\"}],attrs:{\"type\":\"checkbox\",\"name\":\"zhiwei_plugin_switch\",\"id\":\"switch\",\"hidden\":\"\",\"true-value\":true,\"false-value\":false},domProps:{\"checked\":Array.isArray(_vm.switchPlugin)?_vm._i(_vm.switchPlugin,null)>-1:(_vm.switchPlugin)},on:{\"change\":function($event){var $$a=_vm.switchPlugin,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.switchPlugin=$$a.concat([$$v]))}else{$$i>-1&&(_vm.switchPlugin=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.switchPlugin=$$c}}}}),_c('span',{staticClass:\"slide\"})])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"main_popup\">\r\n <div class='index container'>\r\n dfgsdfgsdfgsdfgsdfgsdfgsdfg\r\n <label class=\"switch\" for=\"switch\">\r\n <input type=\"checkbox\"\r\n name=\"zhiwei_plugin_switch\"\r\n id=\"switch\"\r\n hidden\r\n :true-value=\"true\"\r\n :false-value=\"false\"\r\n v-model=\"switchPlugin\">\r\n <span class=\"slide\"></span>\r\n </label>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\n export default {\r\n name: 'popup',\r\n data () {\r\n return {\r\n switchPlugin: true\r\n }\r\n },\r\n mounted() {\r\n chrome.storage.local.get('pluginSwitch', result => {\r\n if (result.hasOwnProperty(\"pluginSwitch\")) {\r\n this.switchPlugin = result.pluginSwitch\r\n }\r\n })\r\n },\r\n watch: {\r\n switchPlugin (newVal, oldVal) {\r\n \tconsole.log(1212121212)\r\n \tconsole.log(newVal)\r\n let storage = chrome.storage.local\r\n storage.set({\r\n 'pluginSwitch': newVal\r\n })\r\n }\r\n }\r\n }\r\n</script>\r\n\r\n<style scoped lang=\"scss\">\r\n .main_popup{\r\n width: 200px;\r\n height: 100px;\r\n }\r\n \r\n .index {\r\n width: 100%;\r\n height:100%;\r\n font-size: 12px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n flex-flow:row nowrap;\r\n .switch{\r\n display: inline-block;\r\n width:76px;\r\n height:36px;\r\n padding: 3px;\r\n position: relative;\r\n &:hover{\r\n cursor: pointer;\r\n }\r\n }\r\n .slide{\r\n position: absolute;\r\n left:0;\r\n right:0;\r\n bottom: 0;\r\n top:0;\r\n background: #ccc;\r\n border-radius: 36px;\r\n }\r\n .slide:before{\r\n margin: 3px;\r\n content: 'OFF';\r\n display: inline-block;\r\n position: absolute;\r\n left:0;\r\n top:0;\r\n width:30px;\r\n height: 30px;\r\n line-height: 30px;\r\n text-align: center;\r\n background: #fff;\r\n border-radius: 50%;\r\n transition: all 0.3s linear;\r\n box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3);\r\n font-size: 12px;\r\n }\r\n #switch:checked + .slide {\r\n background: #2196F3;\r\n }\r\n #switch:checked + .slide:before{\r\n content: 'ON';\r\n transform: translate(40px, 0);\r\n box-shadow: -2px 2px 2px rgba(0, 0, 0, 0.3);\r\n }\r\n }\r\n\r\n</style>","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./popup.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./popup.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./popup.vue?vue&type=template&id=409cdc1c&scoped=true&\"\nimport script from \"./popup.vue?vue&type=script&lang=js&\"\nexport * from \"./popup.vue?vue&type=script&lang=js&\"\nimport style0 from \"./popup.vue?vue&type=style&index=0&id=409cdc1c&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"409cdc1c\",\n null\n \n)\n\nexport default component.exports","import Vue from 'vue'\r\nimport Popup from '@/components/popup.vue'\r\n\r\nVue.config.productionTip = false\r\n/* eslint-disable no-new */\r\nnew Vue({\r\n el: '#popup',\r\n render: h => h(Popup)\r\n})\r\n","import mod from \"-!../../node_modules/_mini-css-extract-plugin@0.7.0@mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/_sass-loader@7.1.0@sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./popup.vue?vue&type=style&index=0&id=409cdc1c&scoped=true&lang=scss&\"; export default mod; export * from \"-!../../node_modules/_mini-css-extract-plugin@0.7.0@mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/_sass-loader@7.1.0@sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./popup.vue?vue&type=style&index=0&id=409cdc1c&scoped=true&lang=scss&\""],"sourceRoot":""}
\ 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