Skip to content

Commit 0ac2037

Browse files
authored
feat: disable getting Cards for now
1 parent 5b80ff2 commit 0ac2037

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

jsHelper/spicetifyWrapper.js

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -737,11 +737,11 @@ applyScrollingFix();
737737
"Slider",
738738
"Dropdown",
739739
"Toggle",
740-
"Cards.Artist",
741-
"Cards.Audiobook",
742-
"Cards.Profile",
743-
"Cards.Show",
744-
"Cards.Track",
740+
// "Cards.Artist",
741+
// "Cards.Audiobook",
742+
// "Cards.Profile",
743+
// "Cards.Show",
744+
// "Cards.Track",
745745
];
746746
if (listOfComponents.every((component) => Spicetify.ReactComponent[component] !== undefined)) return;
747747
const cache = Object.keys(require.m).map((id) => require(id));
@@ -754,37 +754,37 @@ applyScrollingFix();
754754
});
755755
const functionModules = modules.filter((module) => typeof module === "function");
756756
const cardTypesToFind = ["artist", "audiobook", "profile", "show", "track"];
757-
const cards = [
758-
...functionModules
759-
.flatMap((m) => {
760-
return cardTypesToFind.map((type) => {
761-
if (m.toString().includes(`featureIdentifier:"${type}"`)) {
762-
cardTypesToFind.splice(cardTypesToFind.indexOf(type), 1);
763-
return [type[0].toUpperCase() + type.slice(1), m];
764-
}
765-
});
766-
})
767-
.filter(Boolean),
768-
...modules
769-
.flatMap((m) => {
770-
return cardTypesToFind.map((type) => {
771-
try {
772-
if (m?.type?.toString().includes(`featureIdentifier:"${type}"`)) {
773-
cardTypesToFind.splice(cardTypesToFind.indexOf(type), 1);
774-
return [type[0].toUpperCase() + type.slice(1), m];
775-
}
776-
} catch {}
777-
});
778-
})
779-
.filter(Boolean),
780-
];
757+
// const cards = [
758+
// ...functionModules
759+
// .flatMap((m) => {
760+
// return cardTypesToFind.map((type) => {
761+
// if (m.toString().includes(`featureIdentifier:"${type}"`)) {
762+
// cardTypesToFind.splice(cardTypesToFind.indexOf(type), 1);
763+
// return [type[0].toUpperCase() + type.slice(1), m];
764+
// }
765+
// });
766+
// })
767+
// .filter(Boolean),
768+
// ...modules
769+
// .flatMap((m) => {
770+
// return cardTypesToFind.map((type) => {
771+
// try {
772+
// if (m?.type?.toString().includes(`featureIdentifier:"${type}"`)) {
773+
// cardTypesToFind.splice(cardTypesToFind.indexOf(type), 1);
774+
// return [type[0].toUpperCase() + type.slice(1), m];
775+
// }
776+
// } catch {}
777+
// });
778+
// })
779+
// .filter(Boolean),
780+
// ];
781781

782782
Spicetify.ReactComponent.Slider = wrapProvider(functionModules.find((m) => m.toString().includes("progressBarRef")));
783783
Spicetify.ReactComponent.Toggle = functionModules.find((m) => m.toString().includes("onSelected") && m.toString().includes('type:"checkbox"'));
784784
Spicetify.ReactComponent.ScrollableContainer = functionModules.find(
785785
(m) => m.toString().includes("scrollLeft") && m.toString().includes("showButtons")
786786
);
787-
Object.assign(Spicetify.ReactComponent.Cards, Object.fromEntries(cards));
787+
// Object.assign(Spicetify.ReactComponent.Cards, Object.fromEntries(cards));
788788

789789
// chunks
790790
const dropdownChunk = chunks.find(([, value]) => value.toString().includes("dropDown") && value.toString().includes("isSafari"));

0 commit comments

Comments
 (0)