MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / callback

Function callback

src/settings/mainSettings.js:209–321  ·  view source on GitHub ↗

* Callback for settings page for handling click event * @this {HTMLElement} * @param {string} key

(key)

Source from the content-addressed store, hash-verified

207 * @param {string} key
208 */
209 async function callback(key) {
210 switch (key) {
211 case "app-settings":
212 case "backup-restore":
213 case "editor-settings":
214 case "preview-settings":
215 case "terminal-settings":
216 case "lsp-settings":
217 appSettings.uiSettings[key].show();
218 break;
219
220 case "theme":
221 themeSetting();
222 break;
223
224 case "about":
225 About();
226 break;
227
228 case "sponsors":
229 Sponsors();
230 break;
231
232 case "rateapp":
233 rateBox();
234 break;
235
236 case "plugins":
237 plugins();
238 break;
239
240 case "adRewards":
241 openAdRewardsPage();
242 break;
243
244 case "formatter":
245 formatterSettings();
246 break;
247
248 case "editSettings": {
249 actionStack.pop();
250 openFile(settings.settingsFile);
251 break;
252 }
253
254 case "reset":
255 const confirmation = await confirm(
256 strings.warning,
257 strings["restore default settings"],
258 );
259 if (confirmation) {
260 await appSettings.reset();
261 location.reload();
262 }
263 break;
264
265 case "removeads":
266 try {

Callers

nothing calls this directly

Calls 15

themeSettingFunction · 0.85
AboutFunction · 0.85
SponsorsFunction · 0.85
rateBoxFunction · 0.85
pluginsFunction · 0.85
openAdRewardsPageFunction · 0.85
formatterSettingsFunction · 0.85
confirmFunction · 0.85
removeAdsFunction · 0.85
customTabFunction · 0.85
ChangelogFunction · 0.85
resetMethod · 0.80

Tested by

no test coverage detected