Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tools
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
庄欣
tools
Commits
d0b4651f
Commit
d0b4651f
authored
Feb 02, 2021
by
庄欣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixbug
parent
94ef8128
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
10 deletions
+46
-10
image-search-image/docker-compose.yaml
+2
-2
mp-downloader/manifest.json
+1
-1
mp-downloader/static/css/main.css
+19
-2
mp-downloader/static/js/index.js
+24
-5
No files found.
image-search-image/docker-compose.yaml
View file @
d0b4651f
...
...
@@ -17,8 +17,8 @@ services:
server
:
image
:
milvusbootcamp/pic-search-webserver:0.10.0
volumes
:
-
/home/code001/
data/avatar:/tmp/tains
#挂载jj
-
./data/models/:/app/data/models
#模型地址
-
/home/code001/
Pictures:/tmp/tains
-
./data/models/:/app/data/models
environment
:
-
DATA_PATH=/tmp/images-data
#存放经训练的图片
-
MILVUS_HOST=milvus
#milvus地址
...
...
mp-downloader/manifest.json
View file @
d0b4651f
...
...
@@ -15,7 +15,7 @@
}
],
"web_accessible_resources"
:
[
"ui.html"
,
"static/icon.png"
"ui.html"
,
"static/icon.png"
,
"static/close.png"
],
"browser_action"
:
{
"default_icon"
:
"static/icon.png"
,
...
...
mp-downloader/static/css/main.css
View file @
d0b4651f
...
...
@@ -25,7 +25,7 @@
position
:
fixed
;
width
:
1080px
;
height
:
610px
;
z-index
:
9
99
;
z-index
:
9
0
;
}
.__container
{
width
:
500px
;
...
...
@@ -34,7 +34,7 @@
position
:
fixed
;
top
:
20px
;
left
:
20px
;
z-index
:
9
99
;
z-index
:
9
0
;
background
:
#ffffff
;
}
.__container
.hidden
{
...
...
@@ -87,3 +87,20 @@
.__container
.focus
{
box-shadow
:
2px
2px
10px
#FF9F2A
;
}
.x
{
width
:
20px
;
height
:
20px
;
background-color
:
white
;
color
:
#666600
;
display
:
flex
;
border-radius
:
15px
;
justify-content
:
center
;
align-items
:
center
;
align-content
:
center
;
justify-items
:
center
;
position
:
fixed
;
left
:
505px
;
top
:
15px
;
z-index
:
999
;
}
mp-downloader/static/js/index.js
View file @
d0b4651f
...
...
@@ -14,6 +14,8 @@ var img = new Image();
var
checkedProp
=
false
;
img
.
src
=
chrome
.
extension
.
getURL
(
"ui.html"
);
let
icon
=
chrome
.
extension
.
getURL
(
"static/icon.png"
);
let
closeBtnImg
=
chrome
.
extension
.
getURL
(
"static/close.png"
);
var
closeBtnDiv
=
null
;
var
parentDom
=
document
.
createElement
(
"div"
);
parentDom
.
innerHTML
=
"<div class='mpDonloaderParentDom'><img src='"
+
icon
+
"'/></div>"
;
parentDom
.
onclick
=
()
=>
{
...
...
@@ -40,6 +42,17 @@ function openUi() {
var
isFrist
=
true
;
$
.
get
(
UI
,
(
html
)
=>
{
container
=
$
(
html
);
var
closeBtnDiv
=
document
.
createElement
(
"div"
);
var
closeBtn
=
new
Image
();
closeBtn
.
src
=
closeBtnImg
;
$
(
closeBtnDiv
).
click
(
function
()
{
toggleButton
();
});
$
(
closeBtnDiv
).
addClass
(
"x"
);
closeBtnDiv
.
append
(
closeBtn
);
body
.
append
(
closeBtnDiv
);
body
.
append
(
container
);
setTimeout
(
function
()
{
let
tpl
=
container
.
find
(
"#tpl"
)[
0
].
outerHTML
;
let
images
=
getImages
();
var
doms
=
[];
...
...
@@ -75,18 +88,16 @@ function openUi() {
$
(
container
).
find
(
".startDownload"
)[
0
].
onclick
=
function
()
{
downloadAll
();
};
body
.
append
(
container
);
},
500
);
});
}
function
closeUi
()
{
if
(
container
!==
null
)
{
$
(
container
).
remove
();
}
$
(
".x"
).
remove
();
}
function
refreshIndex
()
{
index
=
getIndex
();
}
...
...
@@ -142,7 +153,12 @@ function getImages() {
userNickname
=
$
(
$
(
".user-info > span.nickname"
)[
0
]).
text
();
$
.
each
(
lists
,
(
i
,
n
)
=>
{
urls
=
n
.
currentSrc
.
split
(
"!"
);
let
fullUrl
=
n
.
currentSrc
;
if
(
fullUrl
===
""
)
{
fullUrl
===
$
(
n
).
attr
(
"data-original"
);
}
if
(
fullUrl
!==
""
)
{
urls
=
fullUrl
.
split
(
"!"
);
imgSrc
=
urls
[
0
];
if
(
imgSrc
.
indexOf
(
"videos.mepai.me"
)
<
0
)
{
if
(
records
.
indexOf
(
imgSrc
)
<
0
)
{
...
...
@@ -159,6 +175,9 @@ function getImages() {
});
}
}
}
else
{
console
.
log
(
$
(
n
))
}
});
refreshIndex
();
return
images
;
...
...
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