Skip to content

Commit

Permalink
fix(snippets): improve the code of few snippets (#674)
Browse files Browse the repository at this point in the history
  • Loading branch information
SunsetTechuila authored Feb 2, 2024
1 parent 2dbf138 commit d7316c7
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/resources/snippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default [
{
"title": "Auto-hide Friends",
"description": "Collapse the friends activity sidebar on small screens",
"code": "[aria-label='Friend Activity'] {\n transition: width 0.3s;\n}\n@media screen and (max-width: 1200px) {\n [aria-label='Friend Activity'] {\n width: 0;\n }\n [aria-label='Friend Activity'] .LayoutResizer__resize-bar {\n display: none;\n }\n}",
"code": ".Root__right-sidebar {\n transition: width 0.3s;\n}\n@media screen and (max-width: 1200px) {\n .Root__right-sidebar {\n width: 0;\n }\n .Root__right-sidebar .LayoutResizer__resize-bar {\n display: none;\n }\n}",
"preview": "resources/assets/snippets/auto-hide-friends.png",
},
{
Expand Down Expand Up @@ -170,13 +170,13 @@ export default [
{
"title": "Fix playlist and folder position",
"description": "Replaces the playlists section in the left side bar to align with all the other category icons for the new UI. Screenshot includes 'Playlist icons' snippet",
"code": "div.playlist-item__img.folder, img.playlist-item__img { margin-right: 16px; } div.main-rootlist-rootlist { --left-sidebar-item-height: 32px; --left-sidebar-item-indentation-width: 10px; } div.GlueDropTarget.personal-library > * { height: 32px !important; }",
"code": ".playlist-item__img.folder, .playlist-item__img { margin-right: 16px; } .main-rootlist-rootlist { --left-sidebar-item-height: 32px; --left-sidebar-item-indentation-width: 10px; } div.GlueDropTarget.personal-library > * { height: 32px !important; }",
"preview": "resources/assets/snippets/fix-playlist-and-folder-position.png",
},
{
"title": "Remove recently played from homepage",
"description": "Removes the recently played shelf from the home page",
"code": "section.main-shelf-shelf[aria-label='Recently played'] { visibility: hidden; position: absolute; }",
"code": ".main-shelf-shelf:has([href='/genre/recently-played']) { display: none !important; }",
"preview": "resources/assets/snippets/remove-recently-played.png",
},
{
Expand All @@ -200,7 +200,7 @@ export default [
{
"title": "Remove Popular sections from homepage",
"description": "Thanks Spotify, but I have a music taste",
"code": ".main-shelf-shelf.Shelf:has(> div > div > .main-shelf-seeAll[href='/section/0JQ5DAuChZYPe9iDhh2mJz'], [href='/section/0JQ5DAnM3wGh0gz1MXnu4h'], [href='/section/0JQ5DAnM3wGh0gz1MXnu3B'],[href='/section/0JQ5DAnM3wGh0gz1MXnu3D']) { display: none !important; }",
"code": ".main-shelf-shelf.Shelf:has([href='/section/0JQ5DAuChZYPe9iDhh2mJz'], [href='/section/0JQ5DAnM3wGh0gz1MXnu4h'], [href='/section/0JQ5DAnM3wGh0gz1MXnu3B'], [href='/section/0JQ5DAnM3wGh0gz1MXnu3D']) { display: none !important; }",
"preview": "resources/assets/snippets/remove-popular.png",
},
{
Expand Down Expand Up @@ -236,13 +236,13 @@ export default [
{
"title": "Hide profile username",
"description": "Hides your username next to your profile picture",
"code": "span.Type__TypeElement-sc-goli3j-0.TypeElement-mestoBold-type.main-userWidget-displayName {display: none !important;}",
"code": ".main-userWidget-displayName {display: none !important;}",
"preview": "resources/assets/snippets/hide-profile-username.png",
},
{
"title": "Hide now playing view button",
"description": "Hides the now playing view button from the playbar",
"code": "button:has(path[d='M11.196 8 6 5v6l5.196-3z'], path[d='.966.783 1.75 1.75 1.75h10.5a1.75']) {display: none;}",
"code": "button:has(path[d='M11.196 8 6 5v6l5.196-3z']) {display: none;}",
"preview": "resources/assets/snippets/hide-now-playing-view-button.png",
},
{
Expand All @@ -254,7 +254,7 @@ export default [
{
"title": "Hide recent searches",
"description": "Hides the recent searches section on the search page",
"code": ".search-searchBrowse-SearchBrowse > section {display: none;}",
"code": ".main-shelf-shelf:has(.x-searchHistoryEntries-searchHistoryEntry) {display: none;}",
"preview": "resources/assets/snippets/hide-recent-searches.png",
},
{
Expand All @@ -278,7 +278,7 @@ export default [
{
"title": "Default Progress Bar",
"description": "Return progress bar to default size and location on themes that change it",
"code": ".playback-bar {position: relative !important; display: block !important; --playback-bar-grid-gap: 8px !important; -webkit-box-orient: horizontal !important; -webkit-box-direction: normal !important; -webkit-box-pack: justify !important; -ms-flex-pack: justify !important; -webkit-box-align: center !important; -ms-flex-align: center !important; align-items: center !important; display: -webkit-box !important; display: -ms-flexbox !important; display: flex !important; -ms-flex-direction: row !important; flex-direction: row !important; gap: var(--playback-bar-grid-gap) !important; justify-content: space-between !important; height: 12px !important;} .x-progressBar-progressBarBg {--progress-bar-height: 6px !important; --progress-bar-radius: 10px !important;} :root .Root__now-playing-bar .playback-bar > div {height: 17.59px !important;} .player-controls__buttons--new-icons { margin-bottom: 12px !importan;} .main-nowPlayingBar-nowPlayingBar {padding-bottom: 0px !important;}",
"code": ".playback-bar {position: relative !important; display: block !important; --playback-bar-grid-gap: 8px !important; -webkit-box-orient: horizontal !important; -webkit-box-direction: normal !important; -webkit-box-pack: justify !important; -webkit-box-align: center !important; align-items: center !important; display: -webkit-box !important; display: flex !important; flex-direction: row !important; gap: var(--playback-bar-grid-gap) !important; justify-content: space-between !important; height: 12px !important;} .x-progressBar-progressBarBg {--progress-bar-height: 6px !important; --progress-bar-radius: 10px !important;} :root .Root__now-playing-bar .playback-bar > div {height: 17.59px !important;} .player-controls__buttons--new-icons { margin-bottom: 12px !importan;} .main-nowPlayingBar-nowPlayingBar {padding-bottom: 0px !important;}",
"preview": "resources/assets/snippets/default-progress-bar.png",
},
{
Expand All @@ -302,13 +302,13 @@ export default [
{
"title": "Hide lyrics button",
"description": "Hides the lyrics button in the playbar",
"code": "button.main-nowPlayingBar-lyricsButton { display: none; }",
"code": ".main-nowPlayingBar-lyricsButton { display: none; }",
"preview": "resources/assets/snippets/hide-lyrics-button.png",
},
{
"title": "Hide download button",
"description": "Hide download button in EPs and albums",
"code": "div.x-downloadButton-DownloadButton { display: none; }",
"code": ".x-downloadButton-DownloadButton { display: none; }",
"preview": "resources/assets/snippets/hide-download-button.png",
},
{
Expand All @@ -320,7 +320,7 @@ export default [
{
"title": "Remove top spacing",
"description": "Remove top spacing where should be the Window action buttons. Useful for tiling window managers.",
"code": ".spotify__container--is-desktop .Root__top-container { padding-top: 8px; }",
"code": ".Root__top-container:has([class*='yourLibraryX']) { padding-top: 8px; }",
"preview": "resources/assets/snippets/remove-top-spacing.png",
},
];

0 comments on commit d7316c7

Please sign in to comment.