(el)
| 63 | } |
| 64 | |
| 65 | function removeCallback(el) { |
| 66 | const id = el.dataset.id; |
| 67 | CONFIG.services = CONFIG.services.filter((s) => s !== id); |
| 68 | CONFIG.servicesElement[id].remove(); |
| 69 | |
| 70 | localStorage.setItem("reddit:services", JSON.stringify(CONFIG.services)); |
| 71 | |
| 72 | stackServiceElements(); |
| 73 | } |
| 74 | |
| 75 | for (const name of CONFIG.services) { |
| 76 | CONFIG.servicesElement[name] = createServiceOption(name, posCallback, removeCallback); |
no test coverage detected