modular anti-nitro

This commit is contained in:
Er2 2022-04-11 19:29:17 +03:00
parent 58c34af4e2
commit 8496861816
7 changed files with 115 additions and 80 deletions

View file

@ -3,6 +3,8 @@
* Zlib License
*/
@no-nitro: false; // DO NOT CHANGE! Comment src/nitro to disable anti-nitro
@round: 8px;
@rounder: 16px;
@roundest: 24px; // text area
@ -17,6 +19,7 @@
// Optional
@import "src/hide";
@import "src/mobile";
@import "src/nitro";
// Style
@import "src/materials";

View file

@ -26,7 +26,7 @@
div[class^="layer-"] div.theme-light,
div[class^="downloadApps-"] {
.theme-dimmer();
&:extend(.theme-dimmer all);
div[class*="root-"] {
background-color: var(--background-secondary);

View file

@ -32,27 +32,6 @@ div[class^="nameTag-"],
[class^="usernameInnerRow-"], // at settings
{ &:extend(.hide); }
// Nitro
[class^="marketing"],
[class*="tier"],
[class*="perks-"],
[class*="nitro"],
[class^="upsell"],
[class^="availabilityIndicator-"],
div[class^="serverBoostTabItem-"],
div[class*="hero"],
div[class*="premium"],
div[id*="premium"],
div[class*="goal"],
button[class^="shinyButton"],
[class*="giftButton"],
span[class^="questionMark-"], // at tag change
div[class^="characterCount-"] div[class^="root-"], // at many characters
[class^="clickableSticker-"], // stickers
nav[class^="privateChannels-"] div div // Nitro tab at DM
[data-list-item-id$="nitro"],
{ &:extend(.hide); }
// Suggestions
button[class*="followButton-"], // at top in channels
[class^="nowPlaying"], // in friends tab

35
src/nitro.less Normal file
View file

@ -0,0 +1,35 @@
@no-nitro: true;
.nitro { &:extend(.hide); }
[class^="marketing"],
[class*="tier"],
[class*="perks-"],
[class*="nitro"],
[class^="upsell"],
[class^="availabilityIndicator-"],
div[class^="serverBoostTabItem-"],
div[class*="hero"],
div[class*="premium"],
div[id*="premium"],
div[class*="goal"],
button[class^="shinyButton"],
[class*="giftButton"],
span[class^="questionMark-"], // at tag change
div[class^="characterCount-"] div[class^="root-"], // at many characters
[class^="clickableSticker-"], // stickers
nav[class^="privateChannels-"] div div // Nitro tab at DM
[data-list-item-id$="nitro"],
{ &:extend(.nitro); }
#channels > ul {
div[class^="container-"] {
// boosts
&:extend(.nitro);
// space
& + li {
padding-top: 0;
}
}
}

View file

@ -1,11 +1,4 @@
[class^="botTagVerified-"],
[class^="bannerContainer-"],
[class*="banner-"],
[class^="badgeList-"],
[class^="profileBadges-"],
{ &:extend(.hide); }
div[class^="accountProfileCard-"] div[class^="userInfo-"] {
// settings
justify-content: left;
@ -25,6 +18,14 @@ div[class^="accountProfileCard-"] div[class^="userInfo-"] {
}
}
.profile() when (@no-nitro = true) {
[class^="botTagVerified-"],
[class^="bannerContainer-"],
[class*="banner-"],
[class^="badgeList-"],
[class^="profileBadges-"],
{ &:extend(.nitro); }
div[class^="listItemContents-"] div[class^="userInfo"] {
padding-top: 0;
div[class^="avatar-"] {
@ -32,13 +33,17 @@ div[class^="listItemContents-"] div[class^="userInfo"] {
}
}
div[class^="userPopout-"] {
div[class^="userPopout-"],
div[class^="profileBannerPreview-"] {
div[class^="avatarWrapper"] {
top: 8px; // fix divider bug
}
div[class^="headerTop-"] {
padding-top: 72px; // also fix divider bug
div[class^="headerText"] {
margin-left: 96px; // fix nickname
}
}
}
@ -46,22 +51,46 @@ div[class^="profileBanner"] div[class*="avatar"]:not([class^="imageUploaderInner
margin-left: -8px;
margin-top: -8px;
}
}
.profile();
div[class^="headerTop-"] div[class^="headerText"] {
margin-left: 96px; // fix nickname
// Profile card in settings
div[class^="accountProfileCard-"] {
div[class^="field-"]:nth-child(1) {
height: 0;
div[class^="constrainedRow-"] {
display: none;
}
button {
top: -48pt;
left: 300pt;
}
}
}
div[class^="banner-"] {
position: absolute;
width: inherit;
max-height: 84px;
&:extend(.rounder);
&[class*="popoutBanner"] {
position: relative;
max-height: 128px;
.bottom-border();
}
}
div[class^="avatarWrapper-"] {
margin-right: auto; // fix aligment (bottom of sidebar)
margin-right: auto; // make some space after avatar (sidebar at bottom)
}
// Redesigned profile page
header div[class^="nameTagWithCustomStatus-"],
header div[class^="nameTagNoCustomStatus-"] {
margin-bottom: 48px; // some space under avatar
margin-left: 160px; // after avatar, not before
}
// Redesigned profile page
div[class^="focusLock-"]:not([aria-labelledby]) > div[class^="root-"][class*="small-"] {
flex-direction: row;
@ -110,7 +139,7 @@ div[class^="focusLock-"]:not([aria-labelledby]) > div[class^="root-"][class*="sm
margin-right: 0;
border-bottom: unset;
&:hover, &[class*="selected-"] {
border-right: 2px solid var(--interactive-active);
border-right: 2px solid var(--interactive-active) !important;
}
.top-border();
.left-border(@round);

View file

@ -51,15 +51,14 @@ div[aria-controls*="nitro"],
div[aria-controls="library-inventory-tab"],
div[aria-controls="subscriptions-tab"],
div[aria-controls="billing-tab"],
div[aria-controls^="hypesquad"],
div[aria-controls="stickers-tab"],
{ &:extend(.nitro); }
div[aria-controls="keybinds-tab"],
div[aria-controls="game-activity-tab"],
div[aria-controls^="hypesquad"],
div[aria-controls="stickers-tab"],
div[aria-controls="analytics-tab"],
div[aria-controls="partner-tab"],
{ &:extend(.hide); }
.horiz-tab(@cols: 2) {
@ -92,7 +91,7 @@ div[class^="baseLayout-"] {
div[class^="customizationSection-"] {
&:nth-child(2), &:nth-child(3) {
display: none;
&:extend(.nitro);
}
}
}
@ -131,7 +130,7 @@ div[class^="baseLayout-"] {
&:nth-child(3),
&:nth-child(6),
&:nth-child(7)
{ display: none; }
{ &:extend(.hide); }
&:nth-child(4) {
margin-top: @div-width * 2;
@ -141,20 +140,7 @@ div[class^="baseLayout-"] {
#notifications-tab div[class^="children"] {
div:nth-child(6)
{ display: none; }
}
div[class^="accountProfileCard-"] {
div[class^="field-"]:nth-child(1) {
height: 0;
div[class^="constrainedRow-"] {
display: none;
}
button {
top: -48pt;
left: 300pt;
}
}
{ &:extend(.hide); }
}
#language-tab div[class^="children-"] {
@ -176,6 +162,7 @@ div[class^="accountProfileCard-"] {
// Server settings
#overview-tab div[class^="children-"] > div {
// system messages
&:nth-child(3) {
.horiz-tab();
@ -183,14 +170,16 @@ div[class^="accountProfileCard-"] {
& > :nth-child(2)
{ width: 100%; }
& > :nth-child(3)
& > :nth-child(3) // description
{ display: none; }
}
// notification settings
&:nth-child(4) > div > div:last-child {
.horiz-tab();
}
// nitro features
&:nth-child(5) > div > div:last-child {
.horiz-tab(3);
& > * {
@ -198,9 +187,8 @@ div[class^="accountProfileCard-"] {
margin: 0;
border: none;
}
& > div:first-child div[class^="flexChild-"] {
display: none;
}
& > div:first-child div[class^="flexChild-"]
{ display: none; }
}
}

View file

@ -24,9 +24,10 @@ div[class^="tabBarItem-"] {
margin-right: 16px;
padding: 4px 8px;
&:hover {
background-color: var(--interactive-hover);
color: var(--text-muted) !important;
&:hover,
&[class*="selected-"] {
background-color: var(--interactive-muted) !important;
color: var(--text-normal) !important;
}
}