背景图可以设置纯色也可以设置图片
板块透明度也可以改
有几个板块还没做完,不过能用了
不会用私我
// ==UserScript==
// @name 洛谷
// @namespace http://tampermonkey.net/
// @version 2024-08-20
// @description try to take over the world!
// @author perry6632
// @match https://www.luogu.com.cn/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=cnblogs.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
var fn=function(){
var a=document.querySelector('.footer');
if(a){
a.parentNode.removeChild(a);
}
var b=document.getElementsByClassName("lg-article");
if(b){
for(let i=0;i<b.length;i++){
b[i].style.backgroundColor="rgba(255,255,255,1)";
b[i].style.boxShadow="0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)";
b[i].style.borderRadius="10px";
}
}
var d=document.getElementsByClassName("card");
if(d){
for(let i=0;i<d.length;i++){
d[i].style.backgroundColor="rgba(255,255,255,1)";
d[i].style.boxShadow="0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)";
d[i].style.borderRadius="10px";
}
}
d=document.getElementsByClassName("user-header-top");
if(d){
for(let i=0;i<d.length;i++){
d[i].style.backgroundColor="rgba(255,255,255,1)";
d[i].style.boxShadow="0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)";
d[i].style.borderRadius="10px 10px 0px 0px";
}
}
d=document.getElementsByClassName("am-panel");
if(d){
for(let i=0;i<d.length;i++){
d[i].style.borderStyle="none";
d[i].style.boxShadow="0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)";
d[i].style.borderRadius="10px";
}
}
d=document.getElementsByClassName("test-case");
if(d){
for(let i=0;i<d.length;i++){
d[i].style.boxShadow="0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)";
d[i].style.borderRadius="10px";
}
}
d=document.getElementsByClassName("am-btn");
if(d){
for(let i=0;i<d.length;i++){
b[i].style.backgroundColor="rgba(255,255,255,1)";
d[i].style.boxShadow="0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)";
d[i].style.borderRadius="10px";
}
}
var e=document.getElementsByClassName("background");
if(e){
for(let i=0;i<e.length;i++){
e[i].style.background="rgba(0,0,0,0)";
}
}
e=document.getElementsByClassName("lfe-body mobile-body");
if(e){
for(let i=0;i<e.length;i++){
e[i].style.backgroundColor="rgba(0,0,0,0)";
}
}
e=document.getElementsByClassName("header-layout");
if(e){
for(let i=0;i<e.length;i++){
e[i].setAttribute('style', 'background : rgba(0,0,0,0) !important');
}
}
document.body.style.background="rgb(63, 104, 91)";
//document.body.style.background="url(https://cdn.luogu.com.cn/upload/image_hosting/zx5zcyah.png) fixed";
//document.body.style.backgroundSize="cover";
var f=document.getElementsByClassName("container");
if(f){
if(window.location.href=="https://www.luogu.com.cn/"){
for(let i=0;i<f.length;i++){
f[i].style.maxWidth="1080px";
f[i].style.marginTop="15px";
f[i].style.backgroundColor="rgba(255,255,255,1)";
f[i].style.boxShadow="0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)";
f[i].style.borderRadius="10px";
}
}else if(window.location.href.indexOf("https://www.luogu.com.cn/user/") !== -1){
for(let i=0;i<f.length;i++){
f[i].style.maxWidth="1170px";
f[i].style.marginTop="12px";
f[i].style.backgroundColor="rgba(255,255,255,1)";//header
f[i].style.boxShadow="0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)";
f[i].style.borderRadius="10px";
}
}else{
}
}
f=document.getElementsByClassName("am-center");
if(f){
for(let i=0;i<f.length;i++){
f[i].style.marginTop="30px";
}
}
f=document.getElementsByClassName("header-logo");
if(f){
for(let i=0;i<f.length;i++){
f[i].style.width="80px";
f[i].style.height="40px";
}
}
setTimeout(fn,10)
};
fn()
})();