Skip to content
This repository has been archived by the owner on May 4, 2021. It is now read-only.

Commit

Permalink
Fixes PopupMenu class name
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhas committed Aug 24, 2018
1 parent 7b25edd commit 45b8bd1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
22 changes: 11 additions & 11 deletions Extensions/DJMode.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
Spicetify.LocalStorage.set("DJMode", JSON.stringify(DJSetting));
}

var menuEl = $("#GluePopoverMenu-container");
var menuEl = $("#PopoverMenu-container");

// Observing profile menu
var menuObserver = new MutationObserver(() => {
const innerMenu = menuEl.find(".GlueMenu__root-items");
const innerMenu = menuEl.find(".Menu__root-items");
innerMenu.prepend(
`<div
class="GlueMenuItem GlueMenuItem--has-submenu"
class="MenuItem MenuItem--has-submenu"
role="menuitem"
data-submenu="true"
tabindex="-1"
Expand All @@ -39,12 +39,12 @@
DJ Mode
<div
id="DJModeSubMenu"
class="GlueMenu GlueMenu--is-submenu"
class="Menu Menu--is-submenu"
role="menuitem"
tabindex="-1"
>
<button class="GlueMenuItem .GlueMenuItem--is-active${
DJSetting.enabled ? " GlueMenuItemToggle--checked" : ""
<button class="MenuItem ${
DJSetting.enabled ? "MenuItemToggle--checked MenuItem--is-active" : ""
}"
role="menuitem"
data-submenu="false"
Expand All @@ -54,9 +54,9 @@
Enabled
</button>
<button
class="GlueMenuItem .GlueMenuItem--is-active${
class="MenuItem ${
DJSetting.enabled && DJSetting.hideControls
? " GlueMenuItemToggle--checked"
? "MenuItemToggle--checked MenuItem--is-active"
: ""
}"
role="menuitem"
Expand All @@ -72,7 +72,7 @@
const menu = $("#DJModeMenu");
menu.on("mouseover", () => {
$("#DJModeSubMenu").addClass("open");
$(".GlueMenuItem").removeClass("selected");
$(".MenuItem").removeClass("selected");
menu.addClass("selected");
});
menu.on("mouseleave", () => {
Expand All @@ -91,11 +91,11 @@
Spicetify.LocalStorage.set("DJMode", JSON.stringify(DJSetting));
if (DJSetting.hideControls) {
$("#DJModeToggleControl").addClass(
"GlueMenuItemToggle--checked"
"MenuItemToggle--checked MenuItem--is-active"
);
} else {
$("#DJModeToggleControl").removeClass(
"GlueMenuItemToggle--checked"
"MenuItemToggle--checked MenuItem--is-active"
);
}
});
Expand Down
10 changes: 5 additions & 5 deletions Extensions/autoSkipExplicit.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

let ChristianMode = Spicetify.LocalStorage.get("ChristianMode") === "true";

let menuEl = $("#GluePopoverMenu-container");
let menuEl = $("#PopoverMenu-container");

// Observing profile menu
let menuObserver = new MutationObserver(() => {
const innerMenu = menuEl.find(".GlueMenu__root-items");
const innerMenu = menuEl.find(".Menu__root-items");
innerMenu.prepend(
`<div
class="GlueMenuItem${ChristianMode ? " GlueMenuItemToggle--checked" : ""}"
class="MenuItem${ChristianMode ? " MenuItemToggle--checked MenuItem--is-active" : ""}"
id="ChristianModeToggle"
data-menu-item="christian-mode"
role="menuitemradio"
Expand All @@ -44,9 +44,9 @@
JSON.stringify(ChristianMode)
);
if (ChristianMode) {
toggle.addClass("GlueMenuItemToggle--checked");
toggle.addClass("MenuItemToggle--checked MenuItem--is-active");
} else {
toggle.removeClass("GlueMenuItemToggle--checked");
toggle.removeClass("MenuItemToggle--checked MenuItem--is-active");
}
});
});
Expand Down
2 changes: 1 addition & 1 deletion Spicetify.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ContextAction2 = !CommandMeasure Script ThemeDuplicate()
Name=Spicetify
Author=khanhas (khanhas#3928 @ discord, /u/khanhas @ reddit)
Information=Spice up Spotify client
Version=1.7.4
Version=1.7.5
License=GNU General Public License v3.0

[Variables]
Expand Down

0 comments on commit 45b8bd1

Please sign in to comment.