MCPcopy Index your code
hub / github.com/spicetify/cli / stackServiceElements

Function stackServiceElements

Extensions/popupLyrics.js:1007–1025  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1005 const serviceContainer = document.createElement("div");
1006
1007 function stackServiceElements() {
1008 userConfigs.servicesOrder.forEach((name, index) => {
1009 const el = userConfigs.services[name].element;
1010
1011 const [up, down] = el.querySelectorAll("button");
1012 if (index === 0) {
1013 up.disabled = true;
1014 down.disabled = false;
1015 } else if (index === userConfigs.servicesOrder.length - 1) {
1016 up.disabled = false;
1017 down.disabled = true;
1018 } else {
1019 up.disabled = false;
1020 down.disabled = false;
1021 }
1022
1023 serviceContainer.append(el);
1024 });
1025 }
1026
1027 function switchCallback(el, state) {
1028 const id = el.dataset.id;

Callers 2

posCallbackFunction · 0.70
openConfigFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected