Skip to content

Commit

Permalink
feat(wrapper): set buttons heigh for 1.2.45 and older for Library X
Browse files Browse the repository at this point in the history
  • Loading branch information
rxri committed Sep 7, 2024
1 parent 3e5dc5b commit ca670fa
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions jsHelper/spicetifyWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,21 @@ Spicetify.Events = (() => {
Spicetify.Platform.UserAPI._product_state_service = productStateApi;
})();

(async function setButtonsHeight() {
while (!Spicetify.CosmosAsync) {
await new Promise((res) => setTimeout(res, 100));
}
const expFeatures = JSON.parse(localStorage.getItem("spicetify-exp-features") || "{}");
const isGlobalNavbar = expFeatures?.enableGlobalNavBar?.value;

if (typeof isGlobalNavbar !== "undefined" && isGlobalNavbar === "control") {
await Spicetify.CosmosAsync.post("sp://messages/v1/container/control", {
type: "update_titlebar",
height: Spicetify.Platform.PlatformData.os_name === "windows" ? "40" : "42",
});
}
})();

setInterval(() => {
if (playerState.cache?.isPaused === false) {
const event = new Event("onprogress");
Expand Down

0 comments on commit ca670fa

Please sign in to comment.