mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Fix style in fold comment
This commit is contained in:
parent
4a4ace2995
commit
abfb660196
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name Bilibili Evolved (Offline)
|
||||
// @version 375.00
|
||||
// @version 375.02
|
||||
// @description Bilibili Evolved 的离线版, 所有功能都已内置于脚本中.
|
||||
// @author Grant Howard, Coulomb-G
|
||||
// @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
|
||||
@ -987,7 +987,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/expand-description.min.js"] = (()=>{return(e,p)=>{p.applyStyle("expandDescriptionStyle")}})();
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/favorites-redirect.min.js"] = (()=>{return(t,e)=>{function i(){const t=document.querySelectorAll("li[data-aid]>a");t.forEach(t=>{const e=t.getAttribute("href");if(e===null||!e.includes("medialist")){return}const i=t.parentElement.getAttribute("data-aid");t.setAttribute("href",`https://www.bilibili.com/video/av${i}`)})}(async()=>{const t=await SpinQuery.select("#app>.s-space");if(t!==null){Observer.childListSubtree("#app>.s-space",i)}})()}})();
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fix-fullscreen.min.js"] = (()=>{return(e,n)=>{unsafeWindow.Element.ALLOW_KEYBOARD_INPUT={};const t=unsafeWindow.Element.prototype.requestFullscreen;unsafeWindow.Element.prototype.requestFullscreen=function(){t.call(this)}}})();
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fold-comment.min.css"] = `.panel-area .bb-comment .fold-comment{position:sticky;bottom:0;height:40px;width:calc(100% + 20px);font-size:14px;transform:translateX(-10px);display:flex;align-items:center;justify-content:center;background-color:#fff;color:#99a2aa;cursor:pointer;transition:.2s ease-out;z-index:1000}.panel-area .bb-comment .fold-comment:hover{color:#000}body.dark .panel-area .bb-comment .fold-comment{background-color:#444;color:#eee}body.dark .panel-area .bb-comment .fold-comment:hover{color:var(--theme-color)}`;
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fold-comment.min.css"] = `.panel-area .bb-comment .fold-comment{position:sticky;bottom:0;height:40px;width:calc(100% + 48px);font-size:14px;transform:translateX(-24px);display:flex;align-items:center;justify-content:center;background-color:#fff;color:#99a2aa;cursor:pointer;transition:.2s ease-out;z-index:1000;border-radius:4px}.panel-area .bb-comment .fold-comment:hover{color:#000}body.dark .panel-area .bb-comment .fold-comment{background-color:#444;color:#eee}body.dark .panel-area .bb-comment .fold-comment:hover{color:var(--theme-color)}`;
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fold-comment.min.js"] = (()=>{return(e,t)=>{if(document.URL.replace(window.location.search,"")==="https://t.bilibili.com/"){(async()=>{t.applyImportantStyle("foldCommentStyle");const e=await SpinQuery.select(".card-list .feed-card>.content");const l=e=>{const t=t=>{const l=document.createElement("div");l.classList.add("fold-comment");l.innerHTML="收起评论";const n=t.querySelector(".bb-comment");if(n===null){console.error("未找到评论区");return}else if(n.querySelector(".fold-comment")!==null){return}else{l.addEventListener("click",()=>{const t=e.querySelector(".button-bar").children[1];if(t!==null){t.click();e.scrollIntoView()}});n.insertAdjacentElement("beforeend",l)}};const l=e.querySelector(".panel-area");if(l===null){console.log(e)}if(l.childElementCount===0){const e=Observer.childList(l,n=>{if(n.length>0){t(l);e.forEach(e=>e.stop())}})}else{t(l)}};Observer.childList(e,()=>e.querySelectorAll("div.card").forEach(l))})()}}})();
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/frame-playback.min.css"] = `.frame-playback{display:none!important;height:100%;align-items:center;padding-left:4px;cursor:pointer;filter:brightness(0) invert(1)!important}.frame-playback.touch{padding-left:8px}.frame-playback.touch span{display:flex;align-items:center}.bilibili-player-video-control-bottom .frame-playback{display:flex!important}.frame-playback i{transition:.4s cubic-bezier(.18,.89,.32,1.28);opacity:.9}.frame-playback:not(.touch) i{margin-top:-2px}.bilibili-player.mode-fullscreen .frame-playback span,.bilibili-player.mode-webfullscreen .frame-playback span{transform:scale(1.2)}.bilibili-player.mode-fullscreen .frame-playback:not(.touch) i,.bilibili-player.mode-webfullscreen .frame-playback:not(.touch) i{margin-top:2px}.bilibili-player.mode-webfullscreen .frame-playback{margin-left:8px}.bilibili-player.mode-webfullscreen .frame-playback.touh{margin-left:16px}.frame-playback.prev-frame i{transform:scale(1.3) rotate(-90deg)}.frame-playback.prev-frame:hover i{transform:scale(1.4) rotate(-90deg);opacity:1}.frame-playback.prev-frame:active i{transform:scale(1.25) rotate(-90deg);opacity:1}.frame-playback.next-frame i{transform:scale(1.3) rotate(90deg)}.frame-playback.next-frame:hover i{transform:scale(1.4) rotate(90deg);opacity:1}.frame-playback.next-frame:active i{transform:scale(1.25) rotate(90deg);opacity:1}`;
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/frame-playback.min.html"] = `<div class="frame-playback prev-frame icons-enabled"title=上一帧><span><i class=icon-arrow></i></span></div><div class="frame-playback next-frame icons-enabled"title=下一帧><span><i class=icon-arrow></i></span></div>`;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name Bilibili Evolved (Preview Offline)
|
||||
// @version 375.00
|
||||
// @version 375.02
|
||||
// @description Bilibili Evolved 的预览离线版, 可以抢先体验新功能, 并且所有功能都已内置于脚本中.
|
||||
// @author Grant Howard, Coulomb-G
|
||||
// @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
|
||||
@ -987,7 +987,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/expand-description.min.js"] = (()=>{return(e,p)=>{p.applyStyle("expandDescriptionStyle")}})();
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/favorites-redirect.min.js"] = (()=>{return(t,e)=>{function i(){const t=document.querySelectorAll("li[data-aid]>a");t.forEach(t=>{const e=t.getAttribute("href");if(e===null||!e.includes("medialist")){return}const i=t.parentElement.getAttribute("data-aid");t.setAttribute("href",`https://www.bilibili.com/video/av${i}`)})}(async()=>{const t=await SpinQuery.select("#app>.s-space");if(t!==null){Observer.childListSubtree("#app>.s-space",i)}})()}})();
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fix-fullscreen.min.js"] = (()=>{return(e,n)=>{unsafeWindow.Element.ALLOW_KEYBOARD_INPUT={};const t=unsafeWindow.Element.prototype.requestFullscreen;unsafeWindow.Element.prototype.requestFullscreen=function(){t.call(this)}}})();
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fold-comment.min.css"] = `.panel-area .bb-comment .fold-comment{position:sticky;bottom:0;height:40px;width:calc(100% + 20px);font-size:14px;transform:translateX(-10px);display:flex;align-items:center;justify-content:center;background-color:#fff;color:#99a2aa;cursor:pointer;transition:.2s ease-out;z-index:1000}.panel-area .bb-comment .fold-comment:hover{color:#000}body.dark .panel-area .bb-comment .fold-comment{background-color:#444;color:#eee}body.dark .panel-area .bb-comment .fold-comment:hover{color:var(--theme-color)}`;
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fold-comment.min.css"] = `.panel-area .bb-comment .fold-comment{position:sticky;bottom:0;height:40px;width:calc(100% + 48px);font-size:14px;transform:translateX(-24px);display:flex;align-items:center;justify-content:center;background-color:#fff;color:#99a2aa;cursor:pointer;transition:.2s ease-out;z-index:1000;border-radius:4px}.panel-area .bb-comment .fold-comment:hover{color:#000}body.dark .panel-area .bb-comment .fold-comment{background-color:#444;color:#eee}body.dark .panel-area .bb-comment .fold-comment:hover{color:var(--theme-color)}`;
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fold-comment.min.js"] = (()=>{return(e,t)=>{if(document.URL.replace(window.location.search,"")==="https://t.bilibili.com/"){(async()=>{t.applyImportantStyle("foldCommentStyle");const e=await SpinQuery.select(".card-list .feed-card>.content");const l=e=>{const t=t=>{const l=document.createElement("div");l.classList.add("fold-comment");l.innerHTML="收起评论";const n=t.querySelector(".bb-comment");if(n===null){console.error("未找到评论区");return}else if(n.querySelector(".fold-comment")!==null){return}else{l.addEventListener("click",()=>{const t=e.querySelector(".button-bar").children[1];if(t!==null){t.click();e.scrollIntoView()}});n.insertAdjacentElement("beforeend",l)}};const l=e.querySelector(".panel-area");if(l===null){console.log(e)}if(l.childElementCount===0){const e=Observer.childList(l,n=>{if(n.length>0){t(l);e.forEach(e=>e.stop())}})}else{t(l)}};Observer.childList(e,()=>e.querySelectorAll("div.card").forEach(l))})()}}})();
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/frame-playback.min.css"] = `.frame-playback{display:none!important;height:100%;align-items:center;padding-left:4px;cursor:pointer;filter:brightness(0) invert(1)!important}.frame-playback.touch{padding-left:8px}.frame-playback.touch span{display:flex;align-items:center}.bilibili-player-video-control-bottom .frame-playback{display:flex!important}.frame-playback i{transition:.4s cubic-bezier(.18,.89,.32,1.28);opacity:.9}.frame-playback:not(.touch) i{margin-top:-2px}.bilibili-player.mode-fullscreen .frame-playback span,.bilibili-player.mode-webfullscreen .frame-playback span{transform:scale(1.2)}.bilibili-player.mode-fullscreen .frame-playback:not(.touch) i,.bilibili-player.mode-webfullscreen .frame-playback:not(.touch) i{margin-top:2px}.bilibili-player.mode-webfullscreen .frame-playback{margin-left:8px}.bilibili-player.mode-webfullscreen .frame-playback.touh{margin-left:16px}.frame-playback.prev-frame i{transform:scale(1.3) rotate(-90deg)}.frame-playback.prev-frame:hover i{transform:scale(1.4) rotate(-90deg);opacity:1}.frame-playback.prev-frame:active i{transform:scale(1.25) rotate(-90deg);opacity:1}.frame-playback.next-frame i{transform:scale(1.3) rotate(90deg)}.frame-playback.next-frame:hover i{transform:scale(1.4) rotate(90deg);opacity:1}.frame-playback.next-frame:active i{transform:scale(1.25) rotate(90deg);opacity:1}`;
|
||||
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/frame-playback.min.html"] = `<div class="frame-playback prev-frame icons-enabled"title=上一帧><span><i class=icon-arrow></i></span></div><div class="frame-playback next-frame icons-enabled"title=下一帧><span><i class=icon-arrow></i></span></div>`;
|
||||
|
||||
2
min/fold-comment.min.css
vendored
2
min/fold-comment.min.css
vendored
@ -1 +1 @@
|
||||
.panel-area .bb-comment .fold-comment{position:sticky;bottom:0;height:40px;width:calc(100% + 20px);font-size:14px;transform:translateX(-10px);display:flex;align-items:center;justify-content:center;background-color:#fff;color:#99a2aa;cursor:pointer;transition:.2s ease-out;z-index:1000}.panel-area .bb-comment .fold-comment:hover{color:#000}body.dark .panel-area .bb-comment .fold-comment{background-color:#444;color:#eee}body.dark .panel-area .bb-comment .fold-comment:hover{color:var(--theme-color)}
|
||||
.panel-area .bb-comment .fold-comment{position:sticky;bottom:0;height:40px;width:calc(100% + 48px);font-size:14px;transform:translateX(-24px);display:flex;align-items:center;justify-content:center;background-color:#fff;color:#99a2aa;cursor:pointer;transition:.2s ease-out;z-index:1000;border-radius:4px}.panel-area .bb-comment .fold-comment:hover{color:#000}body.dark .panel-area .bb-comment .fold-comment{background-color:#444;color:#eee}body.dark .panel-area .bb-comment .fold-comment:hover{color:var(--theme-color)}
|
||||
@ -2,9 +2,9 @@
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
height: 40px;
|
||||
width: calc(100% + 20px);
|
||||
width: calc(100% + 48px);
|
||||
font-size: 14px;
|
||||
transform: translateX(-10px);
|
||||
transform: translateX(-24px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@ -13,6 +13,7 @@
|
||||
cursor: pointer;
|
||||
transition: all .2s ease-out;
|
||||
z-index: 1000;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.panel-area .bb-comment .fold-comment:hover {
|
||||
color: black;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user