Commit 3a875e64 by 庄欣

f

parent 6f30458a
chrome.runtime.onMessage.addListener(
function(request, sender, sendResponse) {
chrome.cookies.get({
url: "https://www.mepai.me/",
name: "auth"
}, cookie => {
if (cookie === undefined || cookie === null || cookie === "") {
sendResponse({access_token: ""});
} else {
sendResponse({access_token: cookie.value});
}
});
return true;
}
);
\ No newline at end of file
{
"manifest_version": 3,
"name": "mepai-downloader",
"description": "米拍下图工具",
"version": "1.1",
"permissions": [
"tabs",
"webRequest",
"cookies"
],
"host_permissions": [
"*://*.mepai.me/"
],
"background": {
"service_worker": "background.js"
},
"content_scripts": [
{
"matches": ["https://www.mepai.me/works/*", "https://www.photosaas.cn/*"],
"css": ["static/css/main.css"],
"js": ["static/js/jquery.min.js","static/js/index.js"],
"run_at": "document_end"
}
],
"web_accessible_resources": [
{
"resources": [
"ui.html",
"static/icon.png",
"static/close.png"
],
"matches": [
"*://*.mepai.me/*"
]
}
]
}
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
body {
width:100px;
}
</style>
</head>
<body>
<div>米拍downloader</div>
<div>v0.0.1</div>
</body>
<script src="./static/js/background.js"></script>
</html>
\ No newline at end of file
.mpDonloaderParentDom {
position: fixed;
right:20px;
bottom: 80px;
background-color: #fffccc;
border-radius: 30px;
width: 50px;
height: 50px;
border: 1px solid #ff8528;
display: flex;
text-align: center;
justify-items: center;
justify-content: center;
align-items: center;
align-content: center;
}
.mpDonloaderParentDom img {
height: 40px;
width: 40px;
}
.downloaderUi {
position: fixed;
width: 1080px;
height: 610px;
z-index: 90;
}
.__container {
width: 500px;
height: 700px;
overflow: scroll;
position: fixed;
top:20px;
left:20px;
z-index: 90;
background: #ffffff;
}
.__container .hidden {
display: none;
}
.__container .images {
display: flex;
flex-wrap: wrap;
}
.__container .images .item {
width: 30%;
margin-left: 3%;
margin-top: 10px;
}
.__container .images .item img {
width: 100%;
height: 100%;
}
.__container .mark {
position: relative;
height: 20px;
margin-top:-20px;
opacity: 0.6;
z-index: 100;
width: 100%;
background: #000000;
color: #fffccc;
display: flex;
justify-content: space-between;
}
.__container .mark input {
-webkit-appearance: checkbox!important;
}
.__container .buttons {
display: flex;
margin-top: 10px;
justify-content: center;
margin-bottom: 40px;
}
.__container .buttons .button {
width: 100px;
border-radius: 10px;
margin-right: 20px;
background: #FF9F2A;
text-align: center;
color: #ffffcc;
cursor: hand;
}
.__container .focus {
box-shadow: 2px 2px 10px #FF9F2A;
}
.__x11 {
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;
}
<style>
</style>
<div class="__container">
<div class="hidden" id="tpl">
<div class="item">
<img src="" />
<div class="mark">
<div style="display: flex;font-size: 10px"><input type="checkbox" fileid=""/></div>
<div><label class="fileId"></label></div>
</div>
</div>
</div>
<div class="images">
</div>
<div class="buttons" style="height: 30px;display: flex">
<div style="display: flex;margin-right:20px;">
<div>画质:</div>
<div style="width: 120px">
<select name="quality" style="width: 120px;height:30px;background-color:
#ffeeb8;font-size: 16px;border: 1px #ded748 solid">
<option value="720">720p</option>
<option value="1200">1200p(不支持视频)</option>
<option value="raw">原图</option>
</select>
</div>
</div>
<div>
<button class="button selectAll" style="height: 30px">
全选
</button>
</div>
<div>
<button class="button startDownload" style="height: 30px">
下载
</button>
</div>
</div>
</div>
chrome.extension.onRequest.addListener(
function(request, sender, sendResponse) {
chrome.cookies.get({
url: "https://www.mepai.me/",
name: "auth"
}, cookie => {
if (cookie === undefined || cookie === null || cookie === "") {
sendResponse({access_token: ""});
} else {
sendResponse({access_token: cookie.value});
}
});
});
\ No newline at end of file
......@@ -366,7 +366,7 @@ function getRawPath(worksId, srcs, callback) {
dataType: "json",
success: function (res) {
if (res.code.toString() != "100001") {
alert("用户未登录,请确认您的权限!");
alert("您没有权限,请联系管理员确认您的权限!");
return ;
}
callback(res.data);
......
.cicon {
position: fixed;
right: 20px;
bottom: 20px;
background-color: #fffccc;
border-radius: 30px;
width: 50px;
height: 50px;
border: 1px solid #ff8528;
display: flex;
text-align: center;
justify-items: center;
justify-content: center;
align-items: center;
align-content: center;
}
.x {
width: 30px;
height: 30px;
background-color: white;
color: #666600;
display: flex;
border-radius: 15px;
justify-content: center;
align-items: center;
align-content: center;
justify-items: center;
position: absolute;
right: 0px;
top: -15px;
z-index: 999;
}
.cicon img {
height: 40px;
width: 40px;
}
.out_boxInChajian {
position: fixed;
top: 0px;
width: 100vw;
display: flex;
align-items: center;
justify-content: center;
z-index: 888;
height: 100vh;
margin: 0 auto;
}
.out_backMoadlBox {
position: fixed;
top: 0px;
width: 100vw;
z-index: 900;
height: 100vh;
margin: 0 auto;
background-color: rgba(0, 0, 0, 0.4);
}
.___container-anim-opacity {
animation: 0.22s opacityOut;
-webkit-animation: 0.22s opacityOut;
-moz-animation: 0.22s opacityOut;
}
@keyframes opacityOut {
0% {
opacity: 0
}
50% {
opacity: .8;
}
100% {
opacity: 1;
}
}
#___container {
/* background: linear-gradient(80deg, #fff4b5, #ffd217); */
font-size: 14px;
/* color: #666; */
border-radius: 10px;
height: 540px;
width: 810px;
z-index: 999;
overflow-y: auto;
overflow-x: hidden;
position: absolute;
box-shadow: 0px 0px 12px 2px rgba(0, 0, 0, 0.2);
margin-top: -6vh;
}
#___container .userinfo {
margin-top: 10px;
}
#___container .allcen {
display: flex;
align-items: center;
justify-content: center;
}
#___container .flex-c {
display: flex;
align-items: center;
}
#___container .cuizhi {
display: flex;
flex-direction: column;
}
#___container .cuizhi-cc {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
#___container .jube {
display: flex;
justify-content: space-between;
}
#___container .jube-a {
display: flex;
justify-content: space-around;
}
#___container .hr {
height: 1px;
width: 100%;
background-color: #bbb;
margin: 10px 0;
}
#___container .wei-500 {
font-weight: 500;
}
#___container .wei-600 {
font-weight: 600;
}
#___container .col-fff {
color: #fff;
}
#___container .col-333 {
color: #333;
}
#___container .col-666 {
color: #666;
}
#___container .col-999 {
color: #999;
}
#___container .col-red {
color: #FF542E;
}
#___container .col-green {
color: #1dd923;
}
#___container .title_Out_Back_line {
background: linear-gradient(142deg, #0C7BB3, #8FCBFF);
}
#___container .userPermission_on {
background: linear-gradient(34deg, #76B3FF, #0C7BB3);
border: 1px solid #fff;
}
#___container .userPermission_off {
background: linear-gradient(245deg, #fff, #fff);
border: 1px solid #fff;
}
#___container .userinfo .form-group {
display: flex;
align-content: center;
align-items: center;
width: 100%;
}
#___container .userinfo .headSbox .form-group {
width: 50%;
}
#___container .userinfo .form-group .label {
width: 16%;
display: flex;
justify-content: flex-start;
}
#___container .userinfo .headSbox .form-group .label {
width: max-content;
margin-right: 10px;
}
#___container .userinfo .form-group .input {
/* width: 80%; */
width: max-content;
}
#___container .userinfo .headSbox .form-group .input {
max-width: 140px;
}
#___container button {
cursor: pointer;
background: linear-gradient(0deg, #0089ff, #1960ff) !important;
}
#___container .userinfo .form-group .input input {
width: max-content;
background-color: transparent;
}
#___container textarea {
padding: 12px;
border-radius: 6px;
margin: 8px 0;
}
#___container input[type=radio] {
background-color: #fffccc;
-webkit-appearance: checkbox !important;
height: 15px;
width: 15px;
}
#___container .id-flex {
display: flex;
justify-content: center;
width: 100%;
align-content: center;
align-items: center;
flex-wrap: wrap;
}
#___container a {
text-decoration: underline;
}
#___container div.danger {
display: flex;
align-content: center;
align-items: center;
text-align: center;
color: #ff0000;
justify-content: center;
}
#___container div.primary {
display: flex;
align-content: center;
align-items: center;
text-align: center;
color: #0277bd;
justify-content: center;
}
#___container button.primary {
display: flex;
align-content: center;
align-items: center;
text-align: center;
padding: 5px 10px 5px 10px;
background-color: #0277bd;
color: white;
border-radius: 5px;
}
#___container button.danger {
display: flex;
align-content: center;
align-items: center;
text-align: center;
padding: 5px 10px 5px 10px;
background-color: #ff0000;
color: white;
border-radius: 5px;
}
#___container .zone {
display: flex;
justify-content: center;
align-content: center;
margin: 0 8px;
}
#___container .mask {
position: absolute;
width: 100%;
height: 100%;
z-index: 999;
top: 0;
background-color: rgba(0, 0, 0, 0.2);
display: flex;
justify-content: center;
align-items: center;
align-content: center;
justify-items: center;
color: #ffffff;
}
#___container .xuanzhuan {
animation: xz 1s linear infinite;
}
@keyframes xz {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
#___container .__messagebox_container {
margin: 0 auto;
z-index: 999;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
}
#___container ._button_groups {
margin: 10px auto;
display: flex;
justify-content: space-around;
width: 100%;
}
#___container ._button_groups button {
border-radius: 5px;
}
#___container .btn {
width: auto;
padding-left: 20px;
padding-right: 20px;
background: #0277bd;
border: none;
height: 30px;
color: white;
border-radius: 2px;
}
#___container .pushContent {
margin: 0 auto;
width: 100%;
text-align: left;
}
#___container .activeCls {
background-color: #FF9F2A !important;
color: #FFFF99 !important;
}
#___container .activeCls_on {
background: linear-gradient(72deg, #f9957f, #f2f5d0);
}
#___container .activeCls_off {
background: linear-gradient(72deg, #C1C1C1, #8C8C8C);
}
#___container .upload {
height: 100px;
display: flex;
justify-content: left;
align-content: center;
align-items: center;
padding-left: 30px;
}
#___container .info {
display: flex;
justify-self: left;
padding-left: 20px;
color: #0277bd;
}
#___container .btn-default {
background-color: #ffffff;
color: #333333;
width: auto;
padding-left: 20px;
padding-right: 20px;
border: none;
height: 30px;
border-radius: 2px;
}
chrome.runtime.onMessage.addListener(
function(request, sender, sendResponse) {
chrome.cookies.get({
url: "https://www.mepai.me/",
name: "auth"
}, cookie => {
if (cookie === undefined || cookie === null || cookie === "") {
sendResponse({access_token: ""});
} else {
sendResponse({access_token: cookie.value});
}
});
return true;
});
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"manifest_version": 3,
"name": "mepai-user-remark",
"description": "米拍用户备注小工具",
"version": "1.1",
"permissions": [
"tabs",
"webRequest",
"cookies"
],
"host_permissions": [
"*://*.mepai.me/"
],
"background": {
"service_worker": "js/background.js"
},
"content_security_policy": {
"extension_pages": "script-src 'self'; object-src 'self';"
},
"content_scripts": [
{
"matches": ["https://*.mepai.me/*"],
"css": ["/css/main.css"],
"js": ["/js/jquery.min.js", "/js/vue.runtime.js", "/js/index.js"],
"run_at": "document_end"
}
],
"web_accessible_resources": [
{
"resources": [
"ui.html",
"images/icon.png",
"images/close.png",
"images/loading.png",
"images/close2.png",
"images/nickname.png",
"images/phone.png",
"images/qq.png",
"images/weixin.png",
"images/email.png",
"images/user_id.png"
],
"matches": [
"*://*.mepai.me/*"
]
}
]
}
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
body {
width:100px;
}
</style>
</head>
<body>
<div>米拍快速引用工具</div>
<div>v0.0.1</div>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment