Commit 9f5e0f24 by 庄欣

冲突

parents 04390a5f d089158f
chrome.runtime.onMessage.addListener(
function(request, sender, sendResponse) {
return true;
}
);
.gray {
filter: none!important;
}
body {
filter: none!important;
}
\ No newline at end of file
{
"name": "anti-gray",
"version": "1.0",
"manifest_version": 3,
"description": "anti-gray",
"background": {
"service_worker": "background.js"
},
"content_scripts": [
{
"css": [
"main.css"
],
"js": [
"main.js"
],
"matches": [
"*://*.bilibili.com/",
"*://*.acfun.cn/",
"*://*.ltaaa.cn/",
"*://*.ltaaa.cn/"
]
}
],
"web_accessible_resources": [
{
"resources": [
],
"matches": [
]
}
],
"host_permissions": [
],
"permissions": [
]
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
body {
width:100px;
height:100px;
}
#container {
display: flex;
align-items: center;
align-content: center;
justify-items: center;
justify-content: center;
}
#container button {
background-color: #FF9F2A;
font-size: 18px;
color: white;
margin-top: 20px;
}
</style>
</head>
<body>
</body>
</html>
\ No newline at end of file
...@@ -20,14 +20,14 @@ ...@@ -20,14 +20,14 @@
height: 50px; height: 50px;
} }
#__extend_fast_quote #__extend_fastquote_container #_____mp_fastquote { #__extend_fast_quote #__extend_fastquote_container #_____mp_fastquote {
position: fixed; position: fixed;
width: 30%; width: 60%;
top: 10px; top: 10%;
z-index: 999; z-index: 999;
background-image: linear-gradient(125deg, rgb(239 223 143), rgb(235 209 84), rgb(122 60 25)); background-image: linear-gradient(125deg, rgb(239 223 143), rgb(235 209 84), rgb(122 60 25));
background-size: 400%; background-size: 400%;
left: 35%; left: 15%;
color: #23283f; color: #23283f;
padding-top: 10px; padding-top: 10px;
} }
...@@ -67,8 +67,7 @@ ...@@ -67,8 +67,7 @@
#__extend_fast_quote #__extend_fastquote_container #_____mp_fastquote .form-group { #__extend_fast_quote #__extend_fastquote_container #_____mp_fastquote .form-group {
margin-top: 20px; margin-top: 20px;
padding-left: 10px; width: 100%;
padding-right: 10px;
} }
#__extend_fast_quote #__extend_fastquote_container #_____mp_fastquote .btn-primary { #__extend_fast_quote #__extend_fastquote_container #_____mp_fastquote .btn-primary {
...@@ -119,4 +118,23 @@ ...@@ -119,4 +118,23 @@
#__extend_fast_quote #__extend_fastquote_container #_____mp_fastquote #main-ui { #__extend_fast_quote #__extend_fastquote_container #_____mp_fastquote #main-ui {
overflow-y: scroll; overflow-y: scroll;
min-height: 65vh;
max-height: 95vh;
}
#__extend_fast_quote #__extend_fastquote_container #_____mp_fastquote #main-ui .form{
display: flex;
justify-content: space-between;
}
#__extend_fast_quote #__extend_fastquote_container #_____mp_fastquote #main-ui .form .main-left {
width: 40%;
}
#__extend_fast_quote #__extend_fastquote_container #_____mp_fastquote #main-ui .form .main-right {
width: 40%;
}
#__extend_fast_quote input[name=is_video] {
-webkit-appearance: auto;
} }
\ No newline at end of file
...@@ -6,54 +6,79 @@ ...@@ -6,54 +6,79 @@
<div class="error" id="error"></div> <div class="error" id="error"></div>
<div class="success" id="success"></div> <div class="success" id="success"></div>
<div id="main-ui"> <div id="main-ui" >
<div class="col-12" style="padding-left: 10px"> <div class="col-12" style="margin: 0 auto;text-align: center;">
<h4>添加有米使用记录</h4> <h3>添加有米使用记录</h3>
<h6>(有中台的请在中台标注)</h6> <h5>(有中台的请在中台标注)</h5>
</div>
<div class="form-group">
<label>作品id</label>
<input type="text" disabled id="worksId" class="form-control"/>
</div>
<div class="form-group">
<label>在哪里使用</label>
<select id="channelId" class="form-control">
<option value="">请选择</option>
</select>
</div>
<div class="form-group">
<label>在第三方平台上的标题(选填)</label>
<input type="text" class="form-control" id="title"/>
</div>
<div class="form-group">
<label>使用本组作品的张数</label>
<input type="number" value="1" id="quoteCount" class="form-control"/>
</div> </div>
<div class="form">
<div class="main-left col-md-6">
<div class="form-group">
<label>作品id</label>
<input type="text" disabled id="worksId" class="form-control"/>
</div>
<div class="form-group">
<label>在哪里使用</label>
<select id="channelId" class="form-control">
<option value="">请选择</option>
</select>
</div>
<div class="form-group">
<label>在第三方平台上的标题(选填)</label>
<input type="text" class="form-control" id="title"/>
</div>
<div class="form-group"> <div class="form-group">
<label>使用时间</label> <label>在第三方平台上的标题链接(选填)</label>
<input type="text" id="today" class="form-control"/> <input type="text" class="form-control" id="channelLink"/>
</div> </div>
<div class="form-group">
<label>过审情况</label> <div class="form-group">
<select class="form-control" id="status"> <label>使用本组作品的张数</label>
<option value="0">待审核</option> <input type="number" value="1" id="quoteCount" class="form-control"/>
<option value="1" selected>已过审</option> </div>
<option value="2" selected>被拒绝</option>
</select> <div class="form-group">
</div> <label>第三方发布形式</label>
<div class="form-group"> <div>
<label>过审时间</label> <input type="radio" value="0" name="is_video" checked/>图片
<input type="text" id="passTime" class="form-control" disabled/> <input type="radio" value="1" name="is_video" />视频
<input type="radio" value="2" name="is_video" />文章
</div>
</div>
</div> </div>
<div class="form-group"> <div class="main-right col-md-6">
<label>责编</label> <div class="form-group">
<select class="form-control" id="admins"> <label>推送时间</label>
<input type="text" id="today" class="form-control"/>
</div>
<div class="form-group">
<label>过审情况</label>
<select class="form-control" id="status">
<option value="0">待审核</option>
<option value="1" selected>已过审</option>
<option value="2" selected>被拒绝</option>
</select>
</div>
<div class="form-group">
<label>过审时间</label>
<input type="text" id="passTime" class="form-control" disabled/>
</div>
<div class="form-group">
<label>责编</label>
<select class="form-control" id="admins">
</select>
</div>
<div class="form-group">
<label>管理员备注(选填)</label>
<textarea id="mepaiRemark" class="form-control"></textarea>
</div>
</select>
</div> </div>
<div class="buttons form-group">
<button class="btn btn-primary" id="send">提交</button>
</div> </div>
<div class="buttons form-group">
<button class="btn btn-primary" id="send">提交</button>
</div>
</div> </div>
</div> </div>
...@@ -211,6 +211,17 @@ function goNext() { ...@@ -211,6 +211,17 @@ function goNext() {
var statusDom = document.getElementById("status"); var statusDom = document.getElementById("status");
var worksDom = document.getElementById("worksId"); var worksDom = document.getElementById("worksId");
var passTimeDom = document.getElementById("passTime"); var passTimeDom = document.getElementById("passTime");
var mepaiRemarkDom = document.getElementById("mepaiRemark");
var channelLinkDom = document.getElementById("channelLink");
var isVideoDom = document.getElementsByName("is_video");
if (isVideo()) {
for (var i in isVideoDom) {
if (isVideoDom[i].value != null && isVideoDom[i].value.toString() === "1") {
isVideoDom[i].setAttribute("checked", "checked");
break;
}
}
}
statusDom.onchange = function() { statusDom.onchange = function() {
assertStatus(); assertStatus();
} }
...@@ -253,6 +264,14 @@ function goNext() { ...@@ -253,6 +264,14 @@ function goNext() {
}); });
var sendBtn = document.getElementById("send") var sendBtn = document.getElementById("send")
sendBtn.onclick = function () { sendBtn.onclick = function () {
var isVideoDom = document.getElementsByName("is_video");
var isVideoValue = -1;
for (var i in isVideoDom) {
if (isVideoDom[i].checked) {
isVideoValue = isVideoDom[i].value;
break;
}
}
loading(); loading();
var postData = { var postData = {
"push_time": todayInput.value, "push_time": todayInput.value,
...@@ -262,7 +281,10 @@ function goNext() { ...@@ -262,7 +281,10 @@ function goNext() {
"quote_count": quoteCountDom.value, "quote_count": quoteCountDom.value,
"status": statusDom.value, "status": statusDom.value,
"works_id": worksDom.value, "works_id": worksDom.value,
"pass_time": passTimeDom.value "pass_time": passTimeDom.value,
"is_video": isVideoValue,
"channel_link": channelLinkDom.value,
"mepai_remark": mepaiRemarkDom.value
}; };
if (isNaN(postData['works_id']) || postData['works_id'] <= 0) { if (isNaN(postData['works_id']) || postData['works_id'] <= 0) {
addError("作品id解析失败", true) addError("作品id解析失败", true)
...@@ -274,7 +296,9 @@ function goNext() { ...@@ -274,7 +296,9 @@ function goNext() {
removeLoading(); removeLoading();
return; return;
} }
addSuccess("已添加到后台推送记录"); //addSuccess("已添加到后台推送记录");
prop();
alert("已添加到后台推送记录");
removeLoading(); removeLoading();
setCookie("default_admin", postData['admin_id']); setCookie("default_admin", postData['admin_id']);
setCookie("default_status", postData['status']); setCookie("default_status", postData['status']);
...@@ -301,3 +325,9 @@ function getCookie(key, callback) { ...@@ -301,3 +325,9 @@ function getCookie(key, callback) {
callback(response); callback(response);
}); });
} }
function isVideo() {
var a = document.getElementsByClassName("swiper-wrapper").item(0);
var src = a.firstElementChild.firstElementChild.src;
return src.indexOf("videos.mepai.me") >= 0;
}
\ 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