mirror of
https://github.com/morpheusthewhite/spicetify-themes.git
synced 2024-11-21 18:32:45 +01:00
feat(Turntable): remove the billboard in the Full App Display to improve user experience
This commit is contained in:
parent
a67fa39c88
commit
b7c6af2765
@ -6,6 +6,14 @@ window.addEventListener("load", rotateTurntable = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
const adModalStyle = document.createElement("style");
|
||||
const STYLE_FOR_AD_MODAL = `
|
||||
.ReactModalPortal {
|
||||
display: none
|
||||
}
|
||||
`;
|
||||
adModalStyle.innerHTML = STYLE_FOR_AD_MODAL;
|
||||
|
||||
let playState;
|
||||
|
||||
function handleRotate(fromEvent) {
|
||||
@ -57,8 +65,11 @@ window.addEventListener("load", rotateTurntable = () => {
|
||||
const mainInterface = document.querySelector("#main");
|
||||
const mainPlayBtn = document.querySelector(".main-playButton-PlayButton");
|
||||
const mainTopbarTitle = document.querySelector(".main-entityHeader-topbarTitle");
|
||||
const billboard = document.querySelector("#view-billboard-ad");
|
||||
|
||||
mainInterface.style.display = "block";
|
||||
if (billboard) billboard.closest(".ReactModalPortal").remove();
|
||||
adModalStyle.remove();
|
||||
|
||||
setTimeout(() => {
|
||||
mainPlayBtn.style.removeProperty("opacity");
|
||||
@ -90,6 +101,7 @@ window.addEventListener("load", rotateTurntable = () => {
|
||||
}
|
||||
|
||||
mainInterface.style.display = "none";
|
||||
document.body.append(adModalStyle);
|
||||
|
||||
fullAppDisplay.addEventListener("contextmenu", handleContextMenu);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user