MCPcopy
hub / github.com/spicetify/cli / settingsContent

Function settingsContent

Extensions/trashbin.js:55–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53 }
54
55 function settingsContent() {
56 // Options
57 header = document.createElement("h2");
58 header.innerText = "Options";
59 content.appendChild(header);
60
61 content.appendChild(createSlider("trashbin-enabled", "Enabled", trashbinStatus, refreshEventListeners));
62 content.appendChild(
63 createSlider("TrashbinWidgetIcon", "Show Widget Icon", enableWidget, (state) => {
64 enableWidget = state;
65 state && trashbinStatus ? widget.register() : widget.deregister();
66 })
67 );
68
69 // Local Storage
70 header = document.createElement("h2");
71 header.innerText = "Local Storage";
72 content.appendChild(header);
73
74 content.appendChild(createButton("Copy", "Copy all items in trashbin to clipboard.", copyItems));
75 content.appendChild(createButton("Export", "Save all items in trashbin to a .json file.", exportItems));
76 content.appendChild(createButton("Import", "Overwrite all items in trashbin via .json file.", importItems));
77 content.appendChild(
78 createButton("Clear ", "Clear all items from trashbin (cannot be reverted).", () => {
79 trashSongList = {};
80 trashArtistList = {};
81 setWidgetState(false);
82 putDataLocal();
83 Spicetify.showNotification("Trashbin cleared!");
84 })
85 );
86 }
87
88 function styleSettings() {
89 const style = document.createElement("style");

Callers 1

trashbin.jsFile · 0.85

Calls 6

setWidgetStateFunction · 0.85
putDataLocalFunction · 0.85
createSliderFunction · 0.70
createButtonFunction · 0.70
registerMethod · 0.45
deregisterMethod · 0.45

Tested by

no test coverage detected