mirror of
https://github.com/danbulant/dribbblish-dynamic-theme
synced 2026-05-27 14:02:13 +00:00
add: connect bar state
fix: elapsed time text fix: bookmark select box text color
This commit is contained in:
parent
d8e507b5fa
commit
fa97b3f611
3 changed files with 18 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
let current = '1.6'
|
let current = '1.7'
|
||||||
|
|
||||||
/* css is injected so this works with untouched user.css from Dribbblish */
|
/* css is injected so this works with untouched user.css from Dribbblish */
|
||||||
/* dark theme */
|
/* dark theme */
|
||||||
|
|
|
||||||
|
|
@ -140,8 +140,9 @@ waitForElement([".Root__main-view .os-resize-observer-host"], ([resizeHost]) =>
|
||||||
|
|
||||||
(function Dribbblish() {
|
(function Dribbblish() {
|
||||||
const progBar = document.querySelector(".playback-bar");
|
const progBar = document.querySelector(".playback-bar");
|
||||||
|
const root = document.querySelector(".Root");
|
||||||
|
|
||||||
if (!Spicetify.Player.origin || !progBar) {
|
if (!Spicetify.Player.origin || !progBar || !root) {
|
||||||
setTimeout(Dribbblish, 300);
|
setTimeout(Dribbblish, 300);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -152,7 +153,7 @@ waitForElement([".Root__main-view .os-resize-observer-host"], ([resizeHost]) =>
|
||||||
|
|
||||||
const progKnob = progBar.querySelector(".progress-bar__slider");
|
const progKnob = progBar.querySelector(".progress-bar__slider");
|
||||||
|
|
||||||
Spicetify.Player.addEventListener("onprogress", ({ data: e }) => {
|
function updateProgTime({ data: e }) {
|
||||||
const offsetX = progKnob.offsetLeft + progKnob.offsetWidth / 2;
|
const offsetX = progKnob.offsetLeft + progKnob.offsetWidth / 2;
|
||||||
const maxWidth = progBar.offsetWidth;
|
const maxWidth = progBar.offsetWidth;
|
||||||
const curWidth = Spicetify.Player.getProgressPercent() * maxWidth;
|
const curWidth = Spicetify.Player.getProgressPercent() * maxWidth;
|
||||||
|
|
@ -166,6 +167,17 @@ waitForElement([".Root__main-view .os-resize-observer-host"], ([resizeHost]) =>
|
||||||
}
|
}
|
||||||
tooltip.innerText = Spicetify.Player.formatTime(e) + " / " +
|
tooltip.innerText = Spicetify.Player.formatTime(e) + " / " +
|
||||||
Spicetify.Player.formatTime(Spicetify.Player.getDuration());
|
Spicetify.Player.formatTime(Spicetify.Player.getDuration());
|
||||||
|
}
|
||||||
|
Spicetify.Player.addEventListener("onprogress", updateProgTime);
|
||||||
|
updateProgTime({ data: Spicetify.Player.getProgress() });
|
||||||
|
|
||||||
|
Spicetify.CosmosAsync.sub("sp://connect/v1", (state) => {
|
||||||
|
const isExternal = state.devices.some(a => a.is_active);
|
||||||
|
if (isExternal) {
|
||||||
|
root.classList.add("is-connectBarVisible");
|
||||||
|
} else {
|
||||||
|
root.classList.remove("is-connectBarVisible");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const filePickerForm = document.createElement("form");
|
const filePickerForm = document.createElement("form");
|
||||||
|
|
|
||||||
3
user.css
3
user.css
|
|
@ -817,6 +817,9 @@ html.right-expanded-cover.buddyfeed-visible .main-coverSlotExpanded-container {
|
||||||
background-color: rgba(var(--spice-rgb-selected-row), .3);
|
background-color: rgba(var(--spice-rgb-selected-row), .3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bookmark-filter {
|
||||||
|
color: var(--spice-main) !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* 1.1.56 */
|
/* 1.1.56 */
|
||||||
.main-navBar-navBar {
|
.main-navBar-navBar {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue