mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Add simplify skin
This commit is contained in:
parent
634225543a
commit
fb64acf556
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -96,6 +96,7 @@ const settings = {
|
||||
systemMessage: true,
|
||||
welcomeMessage: true,
|
||||
popup: false,
|
||||
skin: false,
|
||||
},
|
||||
cache: {},
|
||||
};
|
||||
|
||||
@ -96,6 +96,7 @@ const settings = {
|
||||
systemMessage: true,
|
||||
welcomeMessage: true,
|
||||
popup: false,
|
||||
skin: false,
|
||||
},
|
||||
cache: {},
|
||||
};
|
||||
|
||||
@ -31,8 +31,8 @@ style\override-navbar\override-navbar.js|442CD35A7825925F44C5A1934550F74DDBFB5FD
|
||||
style\remove-top-mask.js|9E874B4D5A197BB25C8393B7AAEF433333D8EF84
|
||||
style\remove-watermark.js|5F8324EDE38DD83508B9EA9159F6951F47D48AC2
|
||||
style\scrollbar.css|D7DA1006F2603553A5595336CBA624DA735E9A27
|
||||
style\simplify-liveroom\simplify-liveroom.css|0B691C5FF20D7A2CDC518784F0F4E06CB1186211
|
||||
style\simplify-liveroom\simplify-liveroom.js|D3B9F956C436E0BFA2F010AAC09BC97E49F1D246
|
||||
style\simplify-liveroom\simplify-liveroom.css|3963A87907BAB07E9433CB7D8EE442B1A7541B6A
|
||||
style\simplify-liveroom\simplify-liveroom.js|A5AA9C4ED786793BED5843F71CA93BE99BCE20F7
|
||||
style\tweets.css|A4F3590FC4A0C05FA06659AF142293A3D1FE09D0
|
||||
touch\combo-like.js|3140FCDD2FAA19AD54BB7BE3886C20DF1BC617B2
|
||||
touch\player\touch-player.css|12B4618CFA4A140463FF00CC1720C2785D6C3D65
|
||||
|
||||
@ -70,6 +70,7 @@ export const settings = {
|
||||
systemMessage: true,
|
||||
welcomeMessage: true,
|
||||
popup: false,
|
||||
skin: false,
|
||||
},
|
||||
cache: {},
|
||||
};
|
||||
|
||||
2
min/simplify-liveroom.min.css
vendored
2
min/simplify-liveroom.min.css
vendored
@ -1 +1 @@
|
||||
.simplify-fansMedal .fans-medal-item-ctnr,.simplify-guard i.guard-icon,.simplify-popup .chat-popups-section,.simplify-popup .link-popup-ctnr,.simplify-systemMessage .system-msg,.simplify-title .title-label,.simplify-userLevel .user-level-icon,.simplify-vip .vip-icon,.simplify-welcomeMessage .welcome-guard,.simplify-welcomeMessage .welcome-msg{display:none!important}.simplify-liveroom-settings>ul>li{padding:8px 12px;display:flex;align-items:center}.simplify-liveroom-settings>ul>li:hover{background:rgba(0,0,0,.16)}
|
||||
.simplify-fansMedal .fans-medal-item-ctnr,.simplify-guard i.guard-icon,.simplify-popup .chat-popups-section,.simplify-popup .link-popup-ctnr,.simplify-systemMessage .system-msg,.simplify-title .title-label,.simplify-userLevel .user-level-icon,.simplify-vip .vip-icon,.simplify-welcomeMessage .welcome-guard,.simplify-welcomeMessage .welcome-msg{display:none!important}.simplify-skin #gift-control-vm,.simplify-skin #head-info-vm,.simplify-skin #rank-list-ctnr-box{background-image:none!important}.simplify-liveroom-settings>ul>li{padding:8px 12px;display:flex;align-items:center}.simplify-liveroom-settings>ul>li:hover{background:rgba(0,0,0,.16)}
|
||||
2
min/simplify-liveroom.min.js
vendored
2
min/simplify-liveroom.min.js
vendored
@ -1 +1 @@
|
||||
(()=>{return(e,i)=>{const t={vip:"姥爷图标",fansMedal:"粉丝勋章",title:"活动头衔",userLevel:"用户等级",guard:"舰长图标",systemMessage:"全区广播",welcomeMessage:"欢迎信息",popup:"抽奖提示"};return{widget:{condition:()=>document.URL.startsWith(`https://live.bilibili.com/`),content:`\n <div class="gui-settings-flat-button" style="position: relative" id="simplify-liveroom">\n <i class="mdi mdi-24px mdi-settings"></i>\n <span>简化直播间</span>\n <div class="simplify-liveroom-settings popup">\n <ul>\n <li v-for="item in items" v-on:click="itemClick(item)">\n <i class="mdi mdi-18px" v-bind:class="{'mdi-eye': !item.checked, 'mdi-eye-off': item.checked}"></i>\n {{item.name}}\n </li>\n </ul>\n </div>\n </div>\n `,success:()=>{document.querySelector("#simplify-liveroom").addEventListener("click",e=>{const i=document.querySelector(".simplify-liveroom-settings");if(i.contains(e.target)||e.target===i){return}i.classList.toggle("opened")});const i=(e,i)=>{const t=e?"add":"remove";document.body.classList[t](`simplify-${i}`)};new Vue({el:".simplify-liveroom-settings",data:{items:Object.entries(t).map(([t,s])=>{const n=e.simplifyLiveroomSettings[t];i(n,t);return{key:t,name:s,checked:n}})},methods:{itemClick(t){t.checked=!t.checked;i(t.checked,t.key);e.simplifyLiveroomSettings[t.key]=t.checked;GM_setValue("simplifyLiveroomSettings",e.simplifyLiveroomSettings)}}})}}}}})();
|
||||
(()=>{return(i,e)=>{const t={vip:"姥爷图标",fansMedal:"粉丝勋章",title:"活动头衔",userLevel:"用户等级",guard:"舰长图标",systemMessage:"全区广播",welcomeMessage:"欢迎信息",popup:"抽奖提示",skin:"房间皮肤"};return{widget:{condition:()=>document.URL.startsWith(`https://live.bilibili.com/`),content:`\n <div class="gui-settings-flat-button" style="position: relative" id="simplify-liveroom">\n <i class="mdi mdi-24px mdi-settings"></i>\n <span>简化直播间</span>\n <div class="simplify-liveroom-settings popup">\n <ul>\n <li v-for="item in items" v-on:click="itemClick(item)">\n <i class="mdi mdi-18px" v-bind:class="{'mdi-eye': !item.checked, 'mdi-eye-off': item.checked}"></i>\n {{item.name}}\n </li>\n </ul>\n </div>\n </div>\n `,success:()=>{document.querySelector("#simplify-liveroom").addEventListener("click",i=>{const e=document.querySelector(".simplify-liveroom-settings");if(e.contains(i.target)||i.target===e){return}e.classList.toggle("opened")});const e=(i,e)=>{document.body.classList[i?"add":"remove"](`simplify-${e}`);if(e==="skin"){const e=e=>{SpinQuery.select(i?e+".live-skin-coloration-area":e,e=>{console.log(e.classList);e.classList[i?"remove":"add"]("live-skin-coloration-area")});return e};["#head-info-vm","#gift-control-vm","#rank-list-vm","#rank-list-ctnr-box",".gift-panel",".seeds-wrap>div:first-child",".gift-section>div:last-child",".z-gift-package>div>div",".right-action"].map(e).forEach(e)}};new Vue({el:".simplify-liveroom-settings",data:{items:Object.entries(t).map(([t,s])=>{const n=i.simplifyLiveroomSettings[t];e(n,t);return{key:t,name:s,checked:n}})},methods:{itemClick(t){t.checked=!t.checked;e(t.checked,t.key);i.simplifyLiveroomSettings[t.key]=t.checked;GM_setValue("simplifyLiveroomSettings",i.simplifyLiveroomSettings)}}})}}}}})();
|
||||
@ -11,6 +11,26 @@
|
||||
{
|
||||
display: none !important;
|
||||
}
|
||||
.simplify-skin #head-info-vm,
|
||||
.simplify-skin #gift-control-vm,
|
||||
.simplify-skin #rank-list-ctnr-box
|
||||
{
|
||||
background-image: none !important;
|
||||
}
|
||||
.simplify-guard .guard-danmaku::before
|
||||
{
|
||||
border-image: none !important;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.simplify-guard .guard-danmaku
|
||||
{
|
||||
margin: 0 !important;
|
||||
padding: 4px 5px !important;
|
||||
}
|
||||
.simplify-guard .guard-danmaku::after
|
||||
{
|
||||
background-image: none !important;
|
||||
}
|
||||
.simplify-liveroom-settings>ul>li
|
||||
{
|
||||
padding: 8px 12px;
|
||||
|
||||
@ -7,6 +7,7 @@ const displayNames = {
|
||||
systemMessage: "全区广播",
|
||||
welcomeMessage: "欢迎信息",
|
||||
popup: "抽奖提示",
|
||||
skin: "房间皮肤",
|
||||
}
|
||||
export default {
|
||||
widget: {
|
||||
@ -38,8 +39,30 @@ export default {
|
||||
});
|
||||
const setBodyClass = (checked, key) =>
|
||||
{
|
||||
const method = checked ? "add" : "remove";
|
||||
document.body.classList[method](`simplify-${key}`);
|
||||
document.body.classList[checked ? "add" : "remove"](`simplify-${key}`);
|
||||
if (key === "skin")
|
||||
{
|
||||
[
|
||||
"#head-info-vm",
|
||||
"#gift-control-vm",
|
||||
"#rank-list-vm",
|
||||
"#rank-list-ctnr-box",
|
||||
".gift-panel",
|
||||
".seeds-wrap>div:first-child",
|
||||
".gift-section>div:last-child",
|
||||
".z-gift-package>div>div",
|
||||
".right-action"
|
||||
].forEach(it =>
|
||||
{
|
||||
SpinQuery.select(
|
||||
checked ? it + ".live-skin-coloration-area" : it,
|
||||
skin =>
|
||||
{
|
||||
console.log(skin.classList);
|
||||
skin.classList[checked ? "remove" : "add"]("live-skin-coloration-area");
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
new Vue({
|
||||
el: ".simplify-liveroom-settings",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user